Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more

Getting an Error 403 While accessing products

Solved

Getting an Error 403 While accessing products

breysolecial
Visitor
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,

 

Accepted Solution (1)

Not applicable

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.

 

 

View solution in original post

Reply 1 (1)

Not applicable

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.