App reviews, troubleshooting, and recommendations
Hi.
I'm having issues with the edit theme API:
https://<store-url>/admin/api/2024-10/themes/<id>/assets.json
I know that in order to use this API I need an exemption from Shopify for the write_themes scope, which has already been granted to my App.
My customer authentication logic for installing the App looks pretty much like this:
const accessScopes = 'read_themes,write_themes,read_products,read_customers,read_fulfillments,read_orders'; const endpoint = `https://${shop}/admin/oauth/authorize?client_id=${clientId}&scope=${accessScopes}&redirect_uri=${redirectUri}`; return res.redirect(endpoint);
However, it seems like the auth token I generate with the code doesn't have the write_themes scope.
When I try editing the theme I get this error:
{ "errors": "[API] This action requires merchant approval for write_themes scope." }
I investigated even further, using a OAUTH debugging tool.
Then I used the code returned to generate a token via Postman, I get this result:
{ "access_token": "...", "scope": "read_customers,read_fulfillments,read_orders,read_products,read_themes" }
So the write_themes scope is not included.
My app is already published on the app store, I see in the configs that the write_themes scope is not listed. My app is some legacy express app which doesn't have a TOML file, so how can I edit these scopes on the dashboard? I don't see the option.
Shopify team claims I have the right access
Any help is much appreciated, I need to get this sorted asap.
Thank you in advance.
Learn how to expand your operations internationally with Shopify Academy’s learning path...
By Shopify Feb 4, 2025Hey Community, happy February! Looking back to January, we kicked off the year with 8....
By JasonH Feb 3, 2025Expand into selling wholesale with Shopify Academy’s learning path, B2B on Shopify: Lau...
By Shopify Jan 28, 2025