Reputation: 2910
I am new to Shopify and I'm trying to setup Shopify themekit locally.
I have created an private app and setup my store, but while trying to access store using theme kit I get this error:
Errors: [API] This action requires merchant approval for write_themes scope.
Upvotes: 11
Views: 24639
Reputation: 2215
The 2024 answer. The is no way to change the scope from the UI. But you can do it using the .toml file.
The easiest way is to use the Shopufy CLI:
shopify app config link
. it will create you the .toml. Mine was called shopify.app.toml
and was located in the root of the project folder.shopify app deploy
Note you might need to use parameter --path
in order to specify your project folder.
Here's my app .toml code:
# Learn more about configuring your app at https://shopify.dev/docs/apps/tools/cli/configuration
client_id = "006e3772eb0c81ae3aa2edf000a0123"
name = "hipa"
handle = "hipa-app"
application_url = "https://78c3-98-159-86-186.ngrok-free.app/"
embedded = true
[build]
include_config_on_deploy = true
[access_scopes]
# Learn more at https://shopify.dev/docs/apps/tools/cli/configuration#access_scopes
scopes = "read_content,read_products,write_content,write_products"
[auth]
redirect_urls = [ "https://78c3-98-159-86-186.ngrok-free.app/callback" ]
[webhooks]
api_version = "2024-10"
[pos]
embedded = false
Upvotes: 0
Reputation: 317
Go to your shop admin website https://admin.shopify.com/store/{your-website-name}
Go to Settings
(bottom left corner) -> Apps and sales channels
-> Develop apps
-> [select your app] -> Configuration
tab -> Edit Admin API integration
-> search for the desired scope.
FYI: Private apps were discontinued, and are now called Custom apps.
Upvotes: 9
Reputation: 11
After going into Settings > Apps & Channels, you need to click on 'Develop Apps' button, and then select the related app to access the API settings.
This error may occur for any number of permissions (though the OP asked about 'write_themes' scope).
Errors: [API] This action requires merchant approval for {PERMISSION} scope.
{PERMISSION} may be any number of the listed API permissions. Those without access are now listed under 'Inactive' (vs. 'Disabled').
Search for the permission most closely related to the one listed in your error:
e.g. "errors": [api] this action requires merchant approval for read_content scope. is related to "Store Content" permission = Read.
It's also worth checking that your webhook API version is aligned between the Shopify App config and your private app.
Once you've made your edits and save, you'll be asked to confirm that you want to edit these settings. This is just to make sure you understand what within your store you are giving the app access to; if you are good with the implications, approve and submit and retry the API call from your private app.
Upvotes: 1
Reputation: 4106
Private apps have limited permissions like public apps do. You can fix your app's permissions by opening the private apps section of the admin and tapping on the name of your app.
Scroll down to the section labelled ADMIN API PERMISSIONS
and tap on ▼ Review disabled Admin API permissions
. Set Theme templates and theme assets
to Read and write
and then save and it should work.
Upvotes: 31