简体   繁体   English

Shopify API 配置

[英]Shopify API Configuration

When we created a API, I figured that I need to configure a new Shopify like this当我们创建一个 API 时,我想我需要像这样配置一个新的 Shopify

const Shopify = require('shopify-api-node');

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

Is there any way to get the Shopify "your-shop-name" programmatically?有没有办法以编程方式获取 Shopify“您的商店名称”? 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?或者有没有其他方法可以在 Shopify 上配置 API?

I primarily need to update the product description using Admin REST API.我主要需要使用管理员 REST API 更新产品描述。

In your store, where you want to change descriptions using API calls, use the Admin App section to issue yourself an API key pair.在您的商店中,如果您想使用 API 调用更改描述,请使用 Admin App 部分为自己颁发一个 API 密钥对。 You can give that key pair permission to edit products.您可以授予该密钥对编辑产品的权限。 And you're done, You have the store name obviously.大功告成,您显然有了商店名称。 and you have your access token.你有你的访问令牌。 Nothing to it!没什么!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM