Uninstall app through API wrapper (Python)

Rob_van_den_He1
Shopify Partner
1 0 1

Hi there,

I want to uninstall the connected app through the Python API wrapper when a user wants to uninstall the app from within our platform.
I know that this is possible as explained here: https://docs.shopify.com/api/authentication/uninstalling-applications
But I can't find the specific method in the Python API wrapper. (https://github.com/Shopify/shopify_python_api)

Does anybody know which method I need to call?
 

Reply 1 (1)
devdude
Excursionist
23 1 19

From this test in Python Shopify API wrapper it seems the right way to do this is as follows:

import shopify

# [...] Set up session/auth as normal here

# Delete app from store, triggering shopify cleanup of script tags, webhooks and the like

# NOTE: After this has been called you will no longer be able to call the API for this store and should basicall terminate your code
shopify.ApiPermission.delete()
https://www.merchbot.net