What's your biggest current challenge? Have your say in Community Polls along the right column.
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Custom apps cannot create storefront access token

Custom apps cannot create storefront access token

sad_developer
Tourist
3 0 3

Recently it was announced in the developer changelog that custom apps now have access to the storefront API.

https://shopify.dev/changelog/storefront-api-now-available-for-custom-apps

The documentation for getting started with the storefront API also mentions custom apps

https://shopify.dev/docs/storefront-api/getting-started

You've authenticated using basic HTTP authentication for your private app or using OAuth for your public or custom app. If you're authenticating to the Storefront API as a public app, then you need to turn your app into a sales channel.

However, this does not appear to be working at all and the following error is returned when attempting to create a storefront access token from a custom app:

 

{
  "errors": "App must have a channel record to create a storefront access token."
}

 

The error makes some sense as the custom app is not a sales channel (because custom apps are not able to be a sales channel) and personally I was curious how this was going to even work... but regardless it is supposed to work.

Shopify partner support was not able to provide any insight other than agreeing that it did seem like an issue, I'm expecting a follow-up email from them once they find out more.

Any experience or information on how this is supposed to work would be appreciated.

Reply 1 (1)

teabaggs
Shopify Partner
4 0 1

Hi Sad,

 

I also hit this wall. I did end up getting around it, finally, at least for a custom app I created via the partner dashboard that I am, for now, using only for exploring shopify APIs. Here is what I did:

  1. Uninstall your app from your store (may not be necessary but it is the step I took)
  2. Go to your partner dashboard. Find your app. Go to the app settings page for your app. Click the "Enable Storefront API" button.
  3. Ensure you request the necessary "unauthenticated_*" scopes during your installation handshake.
  4. Re-install your app
  5. request the storefront token

I hope this helps anyone else looking around or coming from https://community.shopify.com/c/shopify-apis-and-sdks/app-must-have-a-channel-record-to-create-a-sto...