Shopify API

Shopify API

codercrux
Shopify Partner
1 0 0

When we creating a API, I figured that I need to configure new Shopify like this

 

const shopify = new Shopify({
  shopName: 'your-shop-name',
  apiKey: 'your-api-key',
  password: 'your-app-password'
});

 

Is there any way to get the Shopify "your-shop-name" programmatically? So If I installed the app on another one it won't need to change. Or is there any other way to configure the API on Shopify?

I primarily need to update the product description using Admin REST API.

Reply 1 (1)

Eric-HAN
Shopify Partner
181 25 20

hi, 

you could create .env file to set env variant values. 

and use  process.env.variant_name to access it.

- Helpful? Please hit Like and mark it as a solution
Want to modify or custom changes on store? Let me help.
- Feel free to Email Me    Buy Me A Coffee