Getting an Error 403 While accessing products

Solved
breysolecial
New Member
2 0 0

Hi 

I have configured my storefront successfully. 

Selected Api version to latest.

But still I am not able to access products.

Please help or if someone can share right configuration details.

 

 

Thanks,

 

0 Likes
Anonymous
Not applicable
1661 0 0

This is an accepted solution.

Have you set your X-Shopify-Storefront-Access-Token header?

You can get your token from {yourshop}.myshopify.com/admin/apps/private and selecting the private app and scrolling down to Storefront API and copying Storefront access token

Also ensure that the required permissions are set.

How are you trying to retrieve your products? 

Just a couple of examples

Fetch

 

 

....
headers: {
    "Content-Type": "application/json",
    "X-Shopify-Storefront-Access-Token":  "YourAccessToken"
  },
....

 

 

 

If you are using GraphiQL - Select 'Edit HTTP Headers'

and add X-Shopify-Storefront-Access-Token in Header name  and your access token in header value.

You can do the same with Postman by entering the values into the Header tab and sending the appropriate body by clicking on body, selecting raw then change the drop down value to JSON.

 

 

0 Likes