How to config access token Storefront API on multiple environment

How to config access token Storefront API on multiple environment

lujbek
Tourist
10 0 0

I have a code block to request Storefront API (need accessToken), it worked well on Development instance. However it won't work once we deploy to other environments such as STAG/PROD because we cannot use the accessToken for Development. How can I config the accessToken properly for multiple env.

 

Noted: In others platform like Nodejs, we can store the token on .env file, is there any relevant way on Shopify ?

 

lujbek_0-1702990980407.png

 

Reply 1 (1)

Liam
Community Manager
3108 340 871

Hi Lujbek,

 

Is this for using the Headless channel or for a custom app?

Liam | Developer Advocate @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog