That would work for a private app. For my use case though, I am trying to work on a public app.
The “Obtaining a Storefront Access Token” section that you point out has two sets of instructions, one for private apps, with the instructions you gave me above.
The other set of instructions are toggled when I click on the “Via the REST API” button, which I assume is for public apps:
Make sure you have the credentials necessary to make authenticated requests to the Shopify API.> 1. Create your Storefront Access Token as described in the reference here.
When I try to create the token, I get the error mentioned in my original post.
Thanks for your help, your solution worked. I didn’t realize that those scopes had been added to the regular scopes, I imagined they would only be available for the acces token.
However, after I got my access token, I can’t use it to request information from GraphQL. Whenever I try to use it, I get a Bad request with the error message SyntaxError: Unexpected token < in JSON at position 1. When I use the token available in the specific store settings, I can get results with the same query. Any help on that?
@Jamie_D_1 thanks for providing some ways to troubleshoot creating Storefront Access Tokens, I have a public app in testing and I’ve tried including all of the unauthenticated access scopes but still am receiving a 401 on the storefront_access_token.json creation endpoint.
I’ve also tried turning my app into a sales channel and vice versa. Are storefront access tokens only available to private apps?