How to get products from specific sales channels?

I’m building a Shopify app that integrates with multiple sales channels, and I need to fetch products associated with specific sales channels using the Storefront API.

Currently, I can get products published to the Online Store sale channel using the Storefront API with an access token that I generate with the admin graphql API and using the products query. But with this setup I don’t get any products that are exclusive to other sales channels.

Am I correct to assume that the products returned by the Storefront API depend on the access token that was used?
If not, how could I control the sale channel scope in my products query.
If yes,
Is it possible to generate a Storefront access token tied to a specific sales channel (e.g., Shopify POS), so that I can retrieve products published to that channel instead of just the Online Store?

Any clarification on how to use Storefront API get products from specific sales channels is appreciated!

Hi @Alon_Mota_Lourenco

Am I correct to assume that the products returned by the Storefront API depend on the access token that was used?

Yes - if your app is a sales channel app, you can generate a a Storefront access token that will reflect the products published to that sales channel. However you cannot get a Storefront token scoped to Shopify POS as you’re not the owner of the Shopify POS app.

If your app is not a sales channel app, and you want to know what products are published to which channels, your best bet is to use the Admin GraphQL API, specifically the publication and productPublications connections:

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

will get you all publications/ sales channels

{
  product(id: "gid://shopify/Product/123456789") {
    publications(first: 10) {
      edges {
        node {
          name
        }
      }
    }
  }
}

lets you inspect product visibility across sales channels.

1 Like