Does uninstalling a Shopify app remove product metadata?

@Community_1

We have created an app in Shopify that populates product metadata. We are using Rest API with Laravel for this. If the app is uninstalled do we need to make sure that this metadata gets removed? We analyzed APIs and didn’t find a way to delete the metadata populate by the app using REST API. There are APIs on GraphQL but due to some development challenges, we would prefer using REST API.

Thanks in advance for your answer

I think it is simply not possible to delete the metafields when a merchant uninstalls the app, because the token to access their shop become invalid, so the app_uninstall webhook is not useful. A workaround could be to add a button to the app that removes every metafield using the metafieldDelete mutation. Maybe you need to store the ids of every metafield definition of the store in your own database to be able to delete them easily.

I am building the uninstall feature for my (new) app.

A merchant taps my button to say “uninstall this app” …

First, I will do some metafield (etc) cleanup to his store, then want to do the actual uninstall. I see some references to how to do this using the rest API, such as https://shopify.dev/docs/apps/build/authentication-authorization/app-installation/uninstall-app-api-request, but that API is going away soon, so would not be a brilliant choice … right?

How can I do the actual uninstall by another API?

Thanks! jb