Reacting on app_uninstalled webhook

Gudata
New Member
5 0 0

Hello,

I am building a Rails application and I have few questions about application uninstall.

I have in the initializer

```

config.webhooks = [
{topic: 'app/uninstalled', address: 'https://www.example.com/webhooks/app_uninstalled', format: 'json'},
]

```

and I have ```AppUninstalledJob``` which is supposed to be triggered by the Shopify engine when the uninstall event is received.

What is not clear to me is who is responsible to register the uninstall event?

There is ```RegisterWebhooksForActiveShops``` which i found here https://shopify.dev/apps/auth/session-tokens/authenticate-an-embedded-app-using-session-tokens but I don't know when to  call that. Should I call it on cron based intervals?

When I call that ```RegisterWebhooksForActiveShops``` from ```rails c``` i expect all the shops to be registered and start sending the uninstall event but that didn't happen.

So what should I do more in the rails so that the uninstall events start flowing?

 

Replies 0 (0)