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:
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?
Solved! Go to the solution
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.
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.