How to get name of my app ?

Solved
Tourist
19 0 2

After users install my app, I want to be able to redirect users to their admin UI with my application loaded, but to do that, I have to redirect to a URL like this:

 

https://customerstore.myshopify.com/admin/apps/my-app-name

 

But I don't know how to load the name of my app as formatted by shopify.  I have an app that would be the production version of the app, but it has "PROD" in the name in my list of apps for testing, but I don't want "PROD" in the final name.  How do I get the 'internal' or URL formatted name of my app as used by shopify?

0 Likes

Success.

Shopify Staff
Shopify Staff
618 45 84

 

Hi @provenq,

 

I'd recommend taking a look at the follow doc about App Bridge's embedded app functionality. Essentially, if you are initializing App Bridge properly with your app, the redirect to the embedded view will happen automatically. 

 

So if your app is hosted at appurl.com, redirecting the merchant to appurl.com while App Bridge is initialized would cause a redirect to the embedded url, such as the 'https://customerstore.myshopify.com/admin/apps/my-app-name' url you mentioned.

 

I hope that offers some clarification.

 

Cheers,

0 Likes
Tourist
19 0 2

Hmmm.  I guess the flow here during install is unclear.  We actually load app bridge during the installation process?  Hmmm.

0 Likes

Success.

Shopify Staff
Shopify Staff
48 21 5

Hi @provenq 

 

We have note here explaining what next after auth flow https://help.shopify.com/en/api/embedded-apps/app-bridge/oauth#whats-next. As @Busfox mentioned, you should let App Bridge does the redirect back to Shopify. Please do not construct Shopify admin URL manually. To do so, when your `redirectUri` is hit, you could redirect to your app home page, then in the home page, initialize App Bridge. 

 

I hope it helps.

 

Thanks, 

Henry

0 Likes
Highlighted
Tourist
19 0 2

Thanks I will do that.

1 Like