Topics covering webhook creation & management, event handling, Pub/Sub, and Eventbridge, in Shopify apps.
Hi I am new to the Shopify,
I am tring to register webhooks, I followd this documentation.
I added below code in shopify_app.rb file
config.webhooks = [
{topic: 'carts/create', address: 'https://95ecca2derw.ngrok.io/webhooks/carts_create', format: 'json'},
{topic: 'carts/update', address: 'https://95ecca2drew.ngrok.io/webhooks/carts_update', format: 'json'}
]
I created 2 jobs for carts/create and carts/update
App is throwing errors while installing.
here is the errors :
Processing by HomeController#index as HTML
Shop Load (0.9ms) SELECT "shops".* FROM "shops" WHERE "shops"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]]
[ActiveJob] [ShopifyApp::WebhooksManagerJob] [6800b7fd-59d1-42c2-9aca-f959e8ed93cc] Error performing ShopifyApp::WebhooksManagerJob (Job ID: 6800b7fd-59d1-42c2-9aca-f959e8ed93cc) from Async(default) in 2828.1ms: ShopifyApp::WebhooksManager::CreationFailed (Topic Invalid topic specified. Topics allowed: app/uninstalled, collections/create, collections/delete, collections/update, products/create, products/delete, products/update, shop/update):
Can anyone please help me
Hey there,
The list of allowed topics you are getting in the error message are the only ones available for you and granted access to based on the scope your token has been created with. Most probably you might need order read/write access scope added to the list of scopes in config.scope
A ton of Thanks Sergiu, works perfectly as expected.