Have your say in Community Polls: What was/is your greatest motivation to start your own business?

Re: Perform some cleanup action on app uninstallation

Perform some cleanup action on app uninstallation

BrainStation23
Shopify Partner
413 62 60

I need to run a cleanup function that uses the admin API at an uninstallation event in my app. I tried using the app/uninstalled webhook but the accessToken saved in my session storage gets invalidated when I get the payload in my webhook endpoint. Is there any way I can use the cleanup function for an uninstallation even and access the admin API ?

Brain Station 23 PLC (Mail: js.sbu@brainstation-23.com)
- Was your question answered? Mark it as an Accepted Solution
- Did the solution not address your concern? We kindly request that share or mail your store URL with us this will enable us to collaborate more closely.
- Explore our Shopify public apps
Reply 1 (1)

JayAdra
Shopify Partner
176 15 44

Sadly not. You can do some cleanup actions, but nothing involving API access, as your token is revoked once they uninstall (as you mentioned).

 

Best you can do is try not to leave a trace, and if you have cleanup tasks needed via API, direct users to click an in-app uninstall action first, or reinstall and click it before uninstalling again etc.