Hi,
I’m following the web pixel docs here. Once the app is created, I:
- Build and deploy the app
- Publish the extension
- Install the app to my development store.
The desired scopes in the shopify.app.toml are:
scopes = "write_pixels,read_customer_events,read_products"
But when I try to mutate the store to install the web pixel, it doesn’t work. I get a reply saying that the write_pixel scope is not granted:
{
"data": {
"webPixelCreate": null
},
"errors": [
{
"message": "Access denied for webPixelCreate field. Required access: `write_pixels` access scope. Also: The app requires read_customer_events access scope and user access permission.",
"locations": [
{
"line": 2,
"column": 3
}
],
"path": [
"webPixelCreate"
],
"extensions": {
"code": "ACCESS_DENIED",
"documentation": "https://shopify.dev/api/usage/access-scopes",
"requiredAccess": "`write_pixels` access scope. Also: The app requires read_customer_events access scope and user access permission."
}
}
],
"extensions": {
"cost": {
"requestedQueryCost": 10,
"actualQueryCost": 10,
"throttleStatus": {
"maximumAvailable": 1000,
"currentlyAvailable": 990,
"restoreRate": 50
}
}
}
}
When I use the shopify graphq app to query the scopes, its indeed not there.
Query:
query {
appInstallation {
accessScopes {
handle
description
}
}
}
And result:
{
"data": {
"appInstallation": {
"accessScopes": [
{
"handle": "read_content",
"description": "Read store content like articles, blogs, comments, pages, and redirects"
},
{
"handle": "read_products",
"description": "Read products, variants, and collections"
},
{
"handle": "unauthenticated_read_product_listings",
"description": "Read product information"
},
{
"handle": "unauthenticated_read_content",
"description": "Read store content like articles, blogs, comments, pages, and redirects"
}
]
}
},
"extensions": {
"cost": {
"requestedQueryCost": 2,
"actualQueryCost": 2,
"throttleStatus": {
"maximumAvailable": 1000,
"currentlyAvailable": 998,
"restoreRate": 50
}
}
}
}
It seems that the scopes requested in the app and defined in file are not being granted/requested propertly.
Any ideas?
Thank you!