All things Shopify and commerce
I am building a custom storefront using Next.JS V.14.1.3 for my Shopify shop. I am using as an example the Next.JS Commerce template v 2.0. Reading the Shopify docs and discussions, I am confused. I have a custom fetch function that should query for all my products in Shopify. This fetch function is called from a server component. Using my storefront public access token everything works perfectly but my understanding is that public access token should be used in queries made from the client components not the server. So I switched my fetch header to use the Storefront Private Access token, but then I read in the docs that I should also pass the Shopify-Storefront-Buyer-IP header so my requests won't get throttled.
1. I don't understand how I should pass this header since I am on the server;
2. Is it ok to use the X-Shopify-Storefront-Access-Token with the public access token value when making fetch call for products from a server component or server action? (Will Shopify know not to throttle API requests since I am not calling the Storefront API from browser directly and not passing any Shopify-Storefront-Buyer-IP address);
June brought summer energy to our community. Members jumped in with solutions, clicked ...
By JasonH Jun 5, 2025Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025