I am trying to access or create Shopify storefront access token. For that, I am following the Shopify documentation [LINK] and I followed the process as defined on doc but I am getting the error in response.
{
"errors": "App must have a channel record to create a storefront access token."
}
On the time of authentication, I also defined the unauthenticated scope as well. (unauthenticated_read_content, unauthenticated_write_customers, unauthenticated_write_checkouts, unauthenticated_read_product_listings) but still getting this error.
Request Information:
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);
});