I am in the process of trying to publish a product. I am using the publishablePublish mutation but getting the error that I need the “read_product_listings” scope but the documentation says I only need the “write_publications” scope which I have.
Below is the publication query I am doing:
mutation PublishProduct($productId: ID!, $publicationIds: [PublicationInput!]!) {
publishablePublish(id: $productId, input: $publicationIds) {
publishable{
publishedOnCurrentPublication
}
}
}
Here is the error:
{
"errors": [
{
"message": "Access denied for publishedOnCurrentPublication field. Required access: `read_product_listings` access scope.",
"locations": [
{
"line": 152,
"column": 7
}
],
"path": [
"publishablePublish",
"publishable",
"publishedOnCurrentPublication"
],
"extensions": {
"code": "ACCESS_DENIED",
"documentation": "https://shopify.dev/api/usage/access-scopes",
"requiredAccess": "`read_product_listings` access scope."
}
}
],
"data": {
"publishablePublish": {
"publishable": null
}
},
"extensions": {
"cost": {
"requestedQueryCost": 10,
"actualQueryCost": 10,
"throttleStatus": {
"maximumAvailable": 2000,
"currentlyAvailable": 1990,
"restoreRate": 100
}
}
}
}
To my knowledge “read_product_listings” is an unauthorized scope so no clue why I would need that for this mutation.
If there is a way to do this without the publishablePublish mutation I’d take that as well.