How do I obtain the app installation slug via API?

jminton
Visitor
1 0 1

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?

 

E.g. https://stopre.myshopify.com/admin/apps/app-slug

 

 

Reply 1 (1)

ahsanibrahim206
Shopify Partner
9 0 0

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
  }
}