Dedicated to the Hydrogen framework, headless commerce, and building custom storefronts using the Storefront API.
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,
Solved! Go to the solution
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.
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.