New Shopify Certification now available: Liquid Storefronts for Theme Developers

How to identify Shopify app embed is active/inactive in the theme?

Dzonotonas
Shopify Partner
12 1 6

Hi 👋

I want to implement this banner in my app:

Dzonotonas_0-1693764129771.png

 

Which Shopify API can return to me a status active/inactive in the current theme?

I found a similar thread, but it's outdated I think: 

https://community.shopify.com/c/authentication-and-access/enable-app-embed-on-installation-of-app/td...

Reply 1 (1)
Dzonotonas
Shopify Partner
12 1 6

I think this one I need:

 

/admin/api/2023-07/themes/{theme_id}/assets.json?asset[key]=config/settings_data.json

 

But the app, which is built using Remix template, returns a 401 error 🤔 How to pass the correct authentication credentials?