GraphQL API Product Post - access denied

Highlighted
New Member
1 0 0

Trying to run the product GraphQL Post via API, when I run the same script within the GraphQL explorer I have no issues with the exact same query, however when I run it in the API I am getting access denied for some reason.  I have tried removing GraphQL app and reinstalling it with full product permissions with no luck.  I currently use the bulk inventory mutation with no issue using the same API post so I'm unsure what the issue is.  Anyone come across this before?

 

{
"data": null,
"errors": [
{
"message": "access denied",
"locations": [
{
"line": 6,
"column": 9
}
],
"path": [
"products",
"edges",
0,
"node",
"publications"
]
}
],
"extensions": {
"cost": {
"requestedQueryCost": 92,
"actualQueryCost": 32,
"throttleStatus": {
"maximumAvailable": 2000.0,
"currentlyAvailable": 1968,
"restoreRate": 100.0
}
}
}
}

0 Likes
Highlighted
Shopify Staff
Shopify Staff
51 10 5

Hi There, 

 

In general you would be seeing access denied due to authentication issues or invalid permissions (i.e. an incorrect API key). I can investigate a little more if you would be able to give me the x-request-id header from the response of any of the denied requests that you're getting.

 

One thing I noticed is that your query is requesting publications. Publications need specific scope that is not available to public or custom applications.

 

Cheers, 

Sanjana

0 Likes