Editing theme via API: This action requires merchant approval for write_themes scope.

Hi.

I’m having issues with the edit theme API:

https:///admin/api/2024-10/themes//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.

https://marcels-devo-store.myshopify.com/admin/oauth/authorize?client_id=7a3fa12c626b17cfe7bcd7778ef36a63&redirect_uri=https://oauthdebugger.com/debug&scope=read_themes,read_products,read_customers,read_fulfillments,read_orders,write_themes&response_type=code&response_mode=form_post&state=8m1h00mg9b6&nonce=hrxpux45ums

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.