I have been trying to create a Storefront Access Token for my public app. I have tried the following:
1. During regular Admin OAuth asking for the unauthenticated endpoints as part of the scope:
[
"unauthenticated_read_collection_listings", "unauthenticated_read_product_listings", "unauthenticated_write_checkouts", "unauthenticated_write_customers", "unauthenticated_read_content"
].join(', ')
2. After the Admin OAuth `access_token` has been created, I attempt to create a Storefront Access Token described in the REST API:
const storefrontAccessTokenResponse = await axios.post(`https://${shop}/admin/storefront_access_token.json`, { headers: { "X-Shopify-Access-Token": accessToken }, body: { storefront_access_token: { title: "Storefront Access Token for Example Shop" } } })
However, I'm consistently getting a `406` error or a `401` error whenever I tweak these parameters and try again. Is there some additional rules to generating a Storefront Access Token that are not documented?
Hello:
I am currently facing the same issue. How did you solve it?
Thanks in advance for your reply!
Best
Hi @Big_Van_Studio1
I'm sorry it's been 2 years since I last dealt with the problem. I ended up abandoning that project shortly thereafter. I can't remember the exact steps I took, but it might have been that I turned the app into a sales channel.
But the policies & rules might have changed since then. Sorry wish I could help further.
Hi @Big_Van_Studio1 sorry to lead you astray!
Wish I could help further, but I really just can't remember what the issue was. Sorry I didn't post it here when I was first doing the project. I hope you find the solution though.
User | Count |
---|---|
12 | |
12 | |
10 | |
7 | |
6 |