Shopify/storefront-api-examples

Shopify Storefront API returning an empty products array

derhallim opened this issue · 2 comments

I am very new to Shopify. I generate a storefront access token, and checked all storefront api permissions. I am using the reactjs project, I added my store info along with the access token in index.js.. I run my code, it doesn't generate any error in the console, however am getting an empty array for products. If I try to set a random token, it will in fact generate an error so I know it's working and communicating with Shopify successfully.

I made sure the products in my store are active. Is there any other step I need to validate?

Storefront API is always scoped to the channel you authenticated with; so for products to be visible they need to be published to that channel/app. Maybe verify that?

That was it..! Thanks @swalkinshaw