New Shopify Certification now available: Liquid Storefronts for Theme Developers

Is it ok to make calls to third party APIs from an embed block theme app extension?

Solved
Prudentt
Shopify Partner
51 7 12

I am building an embed block theme app extension (link to documentation). The documentation states that the embed blocks are used for floating components for the online store and for "Apps that add SEO meta tags, analytics, or tracking pixels."

 

The thing is that for my app i need to make an api call to a 3rd party API, to detect the users's country. So i was wondering if that is ok, given that i haven't found information about it in de documentation.

 

Thank you!

Accepted Solution (1)
Prudentt
Shopify Partner
51 7 12

This is an accepted solution.

Yep, you can just make requests to any api you want from the javascript of the extension once it is enabled, whether it is an app block or app embed. Just use fetch.

View solution in original post

Replies 2 (2)
Tom156
Shopify Partner
6 1 0

Hi, I got the same issue,have you figured it out?

Prudentt
Shopify Partner
51 7 12

This is an accepted solution.

Yep, you can just make requests to any api you want from the javascript of the extension once it is enabled, whether it is an app block or app embed. Just use fetch.