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.

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
275 30 30

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