How to detect app uninstall ?

Highlighted
Shopify Partner
9 0 6

Hi,

What's the best/instant way to detect that my app has been removed from a store ?

0 Likes
Highlighted
Excursionist
70 0 14

Register for the "app/uninstalled" webhook: https://docs.shopify.com/api/webhook

Product Customizer - Creating extremely customizable products within Shopify is no longer a hassle! BlogFeeder - Automatically pull updates from any RSS feed into your Shopify blog Happy Ending - Personalize your thank you page
0 Likes
Highlighted
Shopify Expert
60 0 9

Best (asynchronous): Use the app/uninstalled webhook.

Instant (synchronous): Check if the OAuth token you have is still valid.

Check out my apps: Social Call-to-Action [https://apps.shopify.com/social-call-to-action] and Fliptabify [https://apps.shopify.com/fliptabify]. I also maintain the Shopify API client in PHP [https://github.com/phpish/shopify] and PHP Quickstart Skeletons for building Shopify apps: [https://github.com/phpish/shopify_app-skeleton] and [https://github.com/phpish/shopify_private_app-skeleton]
Highlighted
Tourist
9 0 3

@Sandeep_ShettyIs there a way to know whether a token is invalid other than trying to make a request and getting a 401?

0 Likes