Hi, I am creating public app in that I have created the pages at the time of app installation.
Now, when someone uninstalls the app that time want to delete those pages.
I have created app/uninstalled webhook for page deletion but I am getting error from shopify API like "[API] Invalid API key or access token (unrecognized login or wrong password)".
I have tested page delete shopify API before app uninstallation in postman and works fine.
I didn't understand why it's not working with webhook.
Hey @Annex_Cloud ,
At the point your app is uninstalled and triggers the webhook to you, your API access token will have already been revoked. So you won't be able to perform any actions on the shop, such as deleting the pages you've created.
The only way that this would work is to remove the pages before your app is uninstalled, which can't be done since it's not possible to predict when your app is going to be removed ahead of time.