re-creating webhook does not update api version

Highlighted
New Member
6 0 0

I noticed that new webhooks I've created for new stores seem to come back with an api_version of "2020-01" which I would consider "correct".

 

I've attempted to recreate a webhook on an existing store by deleting it, then re-created it. However, it comes back with a "2019-04", or the old one.

 

I was sure to create the webhook through the 2020-01 version of the api.

 

Am I missing something? What would be the manner by which I could update the webhook api version?

 

Thanks

0 Likes
Highlighted
Shopify Staff
Shopify Staff
1041 140 165

Hey @hg_developer,

 

The webhook API version is set in App Setup > Webhooks.

 

0 Likes
Highlighted
New Member
6 0 0

I was hoping that I could update the version through the API. I'd rather not have to create instructions for people on how to force their stores to use the new webhook version. This can't be done via the API?

0 Likes
Highlighted
Shopify Staff
Shopify Staff
1041 140 165

Have you tried update the app settings to the new version and then recreating the webhooks via the API?

Actually, you might not need to recreate the webhooks. Updating the app settings might be enough.

 

Let me know if you get stuck.

0 Likes
Highlighted
New Member
6 0 0

Can I update the app settings directly through the API? As I mentioned previously, I have access to the stores through the API and wish to keep the webhooks current for my app. Going through each and every UI making a manual adjustment to the webhook seems very unnecessary. If I can make webhook updates through a PUT request, can I not change the version of the webhook as well?

0 Likes
Highlighted
Shopify Staff
Shopify Staff
1041 140 165

The settings in the screenshot above are your app settings (partner login > apps > your app), which you'll only need to update once.

1 Like
Highlighted
New Member
6 0 0

Sorry, I feel like I keep asking the same question, so perhaps I'm not communicating clearly enough. I have a large number stores using a private app for our integration with them. I setup the webhooks through the API because I do NOT have access to the store's UI as in the screenshot. I need to be able to update the version of the webhook directly through the API. I'm guessing more and more that this is not possible. It seems very strange however, that I could create a webhook through the API, I can modify the webhook through the API, however if I want to use the latest version of the webhook, it requires somebody to access the UI of the store and change the dropdown. Just didn't make sense to me.

 

Thanks!

0 Likes
Highlighted
Shopify Staff
Shopify Staff
1041 140 165

No worries! I think the confusion might be around public vs private apps.

 

For public apps, update the version in the app settings (once).

 

For private apps, update the version in admin > private apps > app > settings (for each app). You'll need to have them grant you access or update the version for you. Keep in mind, if an app is set to use an API version that is no longer supported, then Shopify will fall forward to use the oldest supported version. I.e. it will auto update every few months.

 

There's a walkthrough for each here: https://shopify.dev/tutorials/manage-webhook-api-versions

 

Let me know if you have any questions!

 

 

0 Likes
Highlighted
New Member
6 0 0

Thanks. The App in question is a private app. So it looks like I can't make an API call to update that. Note, I think that is probably a fair feature request, since we can do pretty much everything else via the API.

 

The fact that it will roll forward automatically will ultimately fix it. But I wish I could be more pro-active without having to ask customers to make changes to webhooks for me.

 

Thanks again.

0 Likes