Hello guys I have the below GraphQL variable to create a product.
{
"input" :
{
"productType" : "Single Built In Oven",
"title" : "AEG Single Oven Electric BSK792380B - Black Glass",
"productPublications" :
[
{
"publicationId" : "gid://shopify/Publication/76438962261"
}
]
}
}
I have introduced productPublications as it seems this is required to get it into my online sales channel and sure enough… where I run it from the GraphiQL app it runs fine.
I can also run the below from postman and it runs fine:
{
"input" :
{
"productType" : "Single Built In Oven",
"title" : "AEG Single Oven Electric BSK792380B - Black Glass",
}
}
However when I try and run the first one from postman I get the below:
{
"data": {
"productCreate": null
},
"errors": [
{
"message": "Access denied for productCreate field. Required access: `write_products` access scope.",
"locations": [
{
"line": 3,
"column": 3
}
],
"path": [
"productCreate"
],
"extensions": {
"code": "ACCESS_DENIED",
"documentation": "https://shopify.dev/api/usage/access-scopes",
"requiredAccess": "`write_products` access scope."
}
}
],
"extensions": {
"cost": {
"requestedQueryCost": 10,
"actualQueryCost": 10,
"throttleStatus": {
"maximumAvailable": 1000.0,
"currentlyAvailable": 990,
"restoreRate": 50.0
}
}
}
}
But I clearly have permissions otherwise I wouldn’t be able to post the product (without productPublications )
from postman.
Why am I getting these permission issues when I try and productCreate with productPublications as an input?