What's your biggest current challenge? Have your say in Community Polls along the right column.
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

GraphQL - read_publications

GraphQL - read_publications

sd-igorfmachado
Visitor
3 0 3

Hey everyone, 

 

I am completing an integration between an ERP software and Shopify Private APP.

 

While creating the collections and products I noticed that they weren't published ... I then found that I would need to use another mutation for this (publishablePublish).

 

In order to use this mutation I need to know the ID's of the publications. Following Shopify API we could query them using this mutation

 

 

 

query{
  publications(first:10){
    edges{
      node{
        id
        name
      }
    }
  }
}

 

 

 

The response is always the same:

 

 

{
    "data": null,
    "errors": [
        {
            "message": "Access denied for publications field. Required access: `read_publications` access scope.",
            "locations": [
                {
                    "line": 3,
                    "column": 3
                }
            ],
            "path": [
                "publications"
            ],
            "extensions": {
                "code": "ACCESS_DENIED",
                "documentation": "https://shopify.dev/docs/admin-api/access-scopes",
                "requiredAccessScope": "read_publications"
            }
        }
    ],
    "extensions": {
        "cost": {
            "requestedQueryCost": 12,
            "actualQueryCost": 2,
            "throttleStatus": {
                "maximumAvailable": 1000.0,
                "currentlyAvailable": 998,
                "restoreRate": 50.0
            }
        }
    }
}

 

 

 

Is there a solution for this ?

 

Maybe a public app instead of a private one would give me the permission I need ?

 

Thanks in advance.

Igor

Replies 2 (2)

emiller
Shopify Partner
19 0 10

Did you ever figure this out? I can't find a scope by this name anywhere.

vanderschueren
New Member
5 0 0

Did you find a solution? I am currently facing the exact same problem. I want to change the products that are published to the Google & Youtube sales channel. In order to do this I need to perform the same query to get the publication ID of that sales channel but I get the same error message.