GraphQL Admin API access scopes - publications & channels

Highlighted
New Member
2 0 0

Hi everyone,

 

Using the Shopify GraphiQL App I have access to channels and I can successfully make a request for publications - for example:

 

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


Unfortunately when making the same request via the GraphQL Admin API I get "access denied". I have tried adding  "read_channels" and "read_publications" access scopes to no avail. I need to be able to publish newly created products to the Online Store but it seems that I can't do this without the Publication ID.

 

Is there any way to successfully request publications via the GraphQL Admin API? 
And also, is there a way to publish to multiple sales channels via the API?

0 Likes
Highlighted
Shopify Staff
Shopify Staff
426 57 65

Hey @originmaster ,

 

The "read_publications" access scope you are referring to is not publicly available for 3rd party apps (which is why it is not present in our Access Scopes documentation:https://shopify.dev/docs/admin-api/access-scopes). This scope is only available for internal Shopify apps, which is why the Shopify GraphiQL App can make that query but 3rd apps cannot.

 

Hassain | Developer Support Specialist @ Shopify
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Click Accept as Solution 

0 Likes
New Member
2 0 0

Thanks for the reply @hassain

 

I assume this means there's no way to publish newly created products via the API without knowing the online store publicationID in advance?

 

And there is no way to publish to other channels via the API?


 

0 Likes