我正在尝试访问或创建 Shopify 店面访问令牌。为此,我遵循 Shopify 文档[LINK]并遵循文档中定义的流程,但我收到错误响应。
{
"errors": "App must have a channel record to create a storefront access token."
}
在认证的时候,我也定义了未认证的范围。(unauthenticated_read_content, unauthenticated_write_customers, unauthenticated_write_checkouts, unauthenticated_read_product_listings) 但仍然收到此错误。
索取资料:
var request = require("request");
var options = { method: 'POST',
url: 'https://teststore-myteststore.myshopify.com/admin/storefront_access_tokens.json',
headers:
{ 'Postman-Token': 'cc407456-0d7c-42e5-8517-405c3ec6acaf',
'Content-Type': 'application/json',
'X-Shopify-Access-Token': '5c00cd60a76e6dce56e6112dfagfhxvlp' },
body: { storefront_access_token: { title: 'Test2' } },
json: true };
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});