collectionCreate and productCreate access denied

Solved
Highlighted
New Member
10 0 0

We're trying to use the mutations collectionCreate and productCreate but it always says "Access Denied" even though we've already set the permission to "read & write"...

sanabns_4-1603206403050.png

 


And here are some screenshots from postman...

sanabns_1-1603206202596.png

sanabns_2-1603206226888.png

It did worked when we tried it in the Shopify GraphiQL app though... we did also properly set the access token in the header...

sanabns_3-1603206337772.png

 

0 Likes
Highlighted
Shopify Partner
667 47 134

Did you disable the Postman option for sending client-side cookies? I recall sometimes this causes issues with API requests if they are being sent...

0 Likes
Highlighted
New Member
10 0 0

I haven't really played around with the postman's configuration... but one more weird thing is that the request succeeds when I remove the publications property in the variables...

sanabns_0-1603207185590.png

and when that property is there, it fails...

sanabns_1-1603207215542.png

 

0 Likes
Highlighted
Shopify Partner
667 47 134

That's a separate permissions scope. Check that your API token has access to the Publication scope --> https://shopify.dev/docs/admin-api/rest/reference/access/accessscope

0 Likes
Highlighted
New Member
10 0 0

Yeah, I think you're right but there seems to be no access scope for publications in the Admin API Permissions dashboard

0 Likes
Highlighted
Shopify Partner
667 47 134

This is an accepted solution.

Click to expand...
Highlighted
New Member
10 0 0

Ooh, I see. I guess we don't have any choice but to remove it then. But anyway, thanks a lot for this!

0 Likes
Highlighted
Shopify Partner
667 47 134

No problem! It's a shame there isn't a master "gotcha" list somewhere. For example, of access scope gaps, of API calls and properties that are possible in the REST API but not the GraphQL API, of API calls and properties that are possible in the GraphQL API but not the REST API, etc. Would make life a lot easier!   

0 Likes