Development discussions around Shopify APIs
I'm working on an app which injects code into the product.liquid theme file itself.
Upon the `app/uninstalled` webhook, I'd like to clean up this snippet injected by my app, but the user's access token for the store seems to be unusable the moment they uninstall the app. This leaves my snippet left in the theme and most users will not know how / want to clean it up from the theme file manually.
Is there any way I can modify the file on uninstall to perform some cleaning up?
Hi, I am working on similar thing. My app creating product on app install and wanted to delete that product on app uninstall.
At above link i found out that it is not possible. You can send email to customer or do it manually(i know that is not possible).
Reason is same which you told that when app delete from store, shopify block access for that acess_token.
if You find anything please let us know.
Thanks
Thanks @Arhum !
That's such a shame. It would be very inconvenient for customers to do, especially if they are not experienced with editing the code themselves.
In my case, I guess the only solution is to move the injected snippet into JavaScript using the script_tags API which is automatically deleted by Shopify when the app is uninstalled.
For any Shopify staff seeing this, it seems quite important to give apps access to the access token, even if it's 5 minutes after the app is installed. I hope it can be considered - Thanks!
Yes. Exactly. I hope they see this post and consider this issue. This feature can help to maintain cleanliness of customer store as well.
Confirm it!
In app/uninstall webhook session token not valid for any API request
+1
At this point it doesn't surprise me that the Shopify technical team (not support team) won't answer this post.
Lacking documentation, outdated packages, and no information how to perform these simple tasks nor if they have any intention of implementing a solution.
Still looking for a solution to this problem.
+1
Hey Team – my names Strat, Frontend Developer at Shopify!
I understand you'd like to remove app content from a theme after the app has been deleted. As you've noted, apps no longer have permissions to edit a theme once merchants decide to delete the app. I understand how that can be frustrating when you want to clean up your data. Shopify cannot provide access after merchants have decided to revoke it – we need to respect that decision.
As a result, we don't provide options for updating themes after an app has been removed, but you do have some options:
I hope that's helpful moving forward!
@stratify - All the links that appears in your response are not working any more.
User | RANK |
---|---|
10 | |
4 | |
3 | |
3 | |
3 |
As a business owner, have you ever wondered when your customer's first impression of yo...
By Skye Jun 6, 2023We're excited to announce improvements to the threaded messaging experience in our communi...
By TyW May 31, 2023Thank you to everyone who participated in our AMA with Klaviyo. It was great to see so man...
By Jacqui May 30, 2023