Webhook Registration

Taylor_O_Connor
Shopify Partner
11 0 3

Is it possible to create multiple webhooks in one POST to the webhook endpoint?

 

When a user installs my app, I'm registering 37 webhooks and uploading several theme assets. Depending on how fast that process executes I sometimes hit the rate limit on API calls.  Just curious if I could batch those webhook creation requests up in a list and do one POST to the API instead of 37 separate requests.  If I could avoid adding some kind of complex, per-shop throttling mechanism that'd be awesome! : ) 

Josh
Shopify Staff
Shopify Staff
1131 82 194

Hey there, 

Currently this isn't possible as far as I am aware, I would recommend creating a split-second pause in between your POST requests to make sure that you don't accidentally hit any throttles. 

jsimoes
New Member
2 0 0

I'm new to Shopify app dev.

 

Came across this as I develop a custom app for a merchant. This would be nice to have.

 

Also just a clarifying question -- as my app grows, if I need to programmatically subscribe to additional hooks after the initial install -- this requires the merchant to uninstall and reinstall the app?

0 Likes

I think it depends on the scopes your app has access to. If your app needs access to a new scope, you just have to redirect your merchants to the oauth approval link with the new scopes added so you can get a new access token that has been granted access to the new scopes. But, you definitely don't have to have them uninstall and re-install.

I'm not 100% certain though. You may be able to create webhook subscriptions for things you don't have access to, it just won't send you events. Not sure. 

0 Likes