"Topic Invalid" error when creating webhooks

Manu66
Tourist
4 0 1

Hi, I'm using the "shopify_app" gem to create a Shopify app using Rails.

In the initialization file I have this:

 

config.webhooks = [
    { topic: 'customers/data_request', address: ENV['DOMAIN_URL'] + '/webhooks/gdpr_customer', format: 'json' },
    { topic: 'customers/redact', address: ENV['DOMAIN_URL'] + '/webhooks/gdpr_customer', format: 'json' },
    { topic: 'app/uninstalled', address: ENV['DOMAIN_URL'] + '/webhooks/app_uninstalled', format: 'json' },
    { topic: 'shop/redact', address: ENV['DOMAIN_URL'] + '/webhooks/shop_redact', format: 'json' },
  ]

However, when I connect my test store, I can see this error in the console:

ShopifyApp::WebhooksManager::CreationFailed (Topic Invalid topic specified. Topics allowed: app/uninstalled, shop/update, themes/create, themes/delete, themes/publish, themes/update, app_purchases_one_time/update, app_subscriptions/update)

Any idea of why this happens?

 

Thanks

Replies 2 (2)

Visely-Team
Shopify Partner
1843 210 488

Hey Manu,

 

It actually lists all the topics that are valid under "Topics allowed:". Just remove the 3 topics related to GDPR and you should be good. I believe these should be configured at the app level through admin dashboard, I could be wrong though, never used shopify_app gem.

Sergiu Svinarciuc | CTO @ visely.io
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution!
- To learn more about the awesome stuff we do head over to visely.io or our blog
Manu66
Tourist
4 0 1

 


@Visely-Team wrote:

Hey Manu,

 

It actually lists all the topics that are valid under "Topics allowed:". Just remove the 3 topics related to GDPR and you should be good. I believe these should be configured at the app level through admin dashboard, I could be wrong though, never used shopify_app gem.


Hi, this actually makes sense!