How to detect if an app embed block is activated

Topic summary

Detecting whether a Shopify app’s embed block is enabled in a merchant’s theme.

  • Official status: No dedicated API to check app-embed activation yet. Shopify intends to support this in future API versions (no timeframe shared).

  • Practical workaround (current):

    1. Get the active (main) theme ID via Admin REST Theme API.
    2. Read config/settings_data.json via the Assets endpoint.
    3. Inspect the returned JSON’s blocks for your app’s embed entry and check “disabled”: false to confirm it’s enabled.
  • Implementation notes:

    • Example shown using Remix loader with Theme.find(role: ‘main’) and Asset.all(key: ‘config/settings_data.json’).
    • settings_data.json is the theme’s configuration file where app embed state is stored.
    • Asset API is marked deprecated, but reading settings_data.json is still acceptable per user clarification.
    • Shopify docs references were shared for detecting app blocks/app embed blocks.
  • Outcome: No official API solution yet; the JSON parsing workaround is viable now.

  • Open items: Request for a timeline on the official API remains unanswered. Code snippets provided are central to applying the workaround.

Summarized with AI on December 17. AI used: gpt-5.

Hi!

I am currently developing a Shopify app which creates an App embed block the user can activate or not.

I would like to display if the user has already activated the embed block in my app but I don’t find any API for this purpose.

Is there a way to perform this?

Thanks!

3 Likes

Hi GuillaumeFg,

I totally see how it would be helpful to reflect on your apps’ UI when the embed block is active - I’ve connected with our internal devs to see if this is possible.

2 Likes

Hello @Liam , thank you very much !

Hi again Guillaume,

The product team got back to me and while Shopify does not support this at the moment, we’re aiming to allow this functionality in future API versions.

1 Like

Hey @Liam & @GuillaumeFg !

Based on Shopify documentation, this should be possible here

I needed this for my app so I did some investigation on how I can detect if app embed is added by user or not.

Here is what I have found using Remix.

In your loader function, first find the active theme ID, then read the settings_data.json file. The app embed data will be saved in this file when user enable it.

`

const activeTheme = await admin.rest.resources.Theme.find({
session: session,
role: ‘main’,
})

const settings_data = await admin.rest.resources.Asset.all({
session: session,
theme_id: activeTheme.id,
asset: {“key”: “config/settings_data.json”},
});`

It will return a json format.

`

{
“current”: {
“sections”: {

},
“content_for_index”: [

],
“blocks”: {
“17878678986028907411”: {
“type”: “shopify://apps/faceforms-better-pop-ups/blocks/app-embed/f2173231-e611-461d-884b-bd8e6cc2ded4”,
“disabled”: false,
“settings”: {

}
}
}
}
}

`
You can look for your own app embed data if exist in this json file.

“<block_unique_ID>”: {
“type:”: “<partner_name>://apps/<app_name>/blocks/<block_name>/<unique_ID>”

It it exist and enabled you can find out.

I hope it helps other too :slightly_smiling_face:

Thank you!

6 Likes

Hey @Hujjat thanks for reply, I see asset api is marked as deprecated. Did you find any other way for verification?

1 Like

After checking docs carefully I see reading is not a problem so we can use this method :folded_hands:

1 Like

great tips! shopify also has this guide for checking if an extension is installed:

https://shopify.dev/docs/apps/build/online-store/theme-app-extensions/configuration#detecting-app-blocks

look good. Thank you

Hi @Liam is there any news on when Shopify plans to make this feature available via API? Knowing any timeframe would be a great help.

5 Likes