Hello
When a customer installs an app, how do we obtain the installation slug through the API to redirect the customer back to the app in their Shopify account?
A developer is seeking guidance on how to programmatically retrieve the app installation slug needed to redirect customers back to their app within the Shopify admin (e.g., https://store.myshopify.com/admin/apps/[app-slug]).
Proposed Solution:
Another user suggests obtaining the shop URL first via the Shop API or GraphQL, then using GraphQL code to retrieve the app slug through an app handle markup structure.
Status:
The discussion appears to have an initial solution proposed, though implementation details in the code snippet are unclear due to formatting issues. The question may benefit from further clarification or validation of the suggested approach.
Hello
When a customer installs an app, how do we obtain the installation slug through the API to redirect the customer back to the app in their Shopify account?
Hello Jminton, I was facing the same issue regarding the app URL for redirecting to the app. I have just found a solution.
You can obtain a shop URL by using the shop API or GraphQL. Then, to get the app slug, use the following GraphQL code:
{
app {
handle
}
}