I’m building a Shopify embedded app using the official Remix app template, and I’m trying to programmatically save changes to the live theme (Online Store 2.0) — specifically to either:
- Automatically activate my Theme App Extension (a section like
chat-widget.liquid
)
- Or inject a script or block directly into the
theme.liquid
or templates/product.json
Automatically activate my Theme App Extension (a section like chat-widget.liquid
)
There’s no API endpoint/ operation that will let you automatically activate a theme app extension. You’ll need to use a deep link that merchants can use to activate the theme app extension.
inject a script or block directly into the theme.liquid
or templates/product.json
If your app is not a public app (on the Shopify App Store) you could use the Asset API - but I wouldn’t recommend this as it’s part of the REST API, which is legacy and will be deprecated in the future.
Thank you for your response. I have resolved that issue.
However, I’m now facing another problem:
My app requires the write_themes
scope, and the user has accepted the necessary permissions.
But Shopify says that a write theme exemption is required, and I need to fill out a form for it.
My app is still in the development phase and is not published yet.
Great to hear you solved the first issue.
You can use the Online Store Protected Scope Exemption Request and just add a note saying the app is not yet submitted in the required Shopify App Store URL field.