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

Reply 1 (1)

emiller
Shopify Partner
19 0 5

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