Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Admin Link app extensions - dynamic/relative URLs

Admin Link app extensions - dynamic/relative URLs

Richard687
Shopify Partner
19 1 16

Admin Link app extensions work fine for a stable, production app. However, for a dev app where the hostname changes regularly (e.g. https://some-random-word-combination.trycloudflare.com) it can be really cumbersome to test Admin Link app extensions.

 

It would be very helpful if it was possible to specify a relative URL for an app extension, and Shopify dynamically prefixed it with the main App URL. As can be seen in the screenshot below, it rejects my attempts. Is there a clever way around this that I'm missing? If not, could this be considered as a feature request?

 

Richard687_1-1697712709295.png

Reply 1 (1)

baggio_giacomo
Shopify Partner
21 0 2

Hi there, here's how you can do it. In my example I've created an admin link to be displayed on the product variant page.

If you put https://admin.shopify.com/admin-link as URL, the merchant will be redirected to https://admin.shopify.com/store/<your_store>/apps/<your app name>/admin-link?id=<product variant id>&shop=<shopify domain>`