Obtaining my app's domain inside a checkout extension

joelurraco
Shopify Partner
19 0 8

Hello!

 

I am currently building a Checkout UI Extension that needs to make an API call to my Shopify APP. Is there a way to obtain my app's current domain without setting it as a hardcoded variable?

 

Thank you very much.

Replies 2 (2)
masonmcelvain
Shopify Partner
6 1 1

If you want the myshopify url, there's this: https://shopify.dev/docs/api/checkout-ui-extensions/unstable/apis/standardapi#properties-propertydet...

 

const { shop } = useExtensionApi();
shop.myshopifyDomain

 

joelurraco
Shopify Partner
19 0 8

Thanks for the info, but I am looking for my app's url, not the store's