"Token must be service access" when tying to create a storefront access token

waliby
Shopify Partner
8 0 2

Hi, I did all the steps to be able to use the call POST /admin/storefront_access_tokens.json

Unfortunately, I got the error {"errors":"Token must be service access."}

 

I tried this call manually using the X-Shopify-Access-Token generated by app (token still valid of course)

My app is already a sale channel and the Scope (unauthenticated_...) has already been added.

 

If any idea about it, please let me know

 

( is my issue in link with what happened to Shopify ? https://status.shopify.com/#week )

Replies 6 (6)
Alex
Shopify Staff
Shopify Staff
1561 81 337

It looks like this error will surface under any of these conditions:

 

1. Your access token is a per-user online access token

2. Your access token is a delegate access token

3. There is a unexpired refresh token that exists

 

Cheers.

Alex | Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog

brianhayes
New Member
1 0 0

@Alex That's fine and all, but none of that actually gives much to work with as a solution.

 

If the token generated via authorizing the app, which gives access to the Admin API, isn't also valid to make requests to the `/admin/api/2019-04/storefront_access_tokens.json` endpoint, then what needs to be done further?

 

A fuller explanation of the error, followed by an  actual solution, or course of action, would be much appreciated.

Alex
Shopify Staff
Shopify Staff
1561 81 337

@brianhayes the solution to the issue should be to use an access token which does not fall under the aforementioned three possible states. If you feel that your access token does not fall under any of those states, you can provide me with your app's ID (the integer found at the end of the URL in your partner dashboard when inspecting the app), a shop ID, and a time frame (last 12 days will give me access to logs).

Alex | Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog

Borbit
Tourist
5 0 0

@Alex I have the same issue, please help me to figure it out. My app id: 2832799. Thank you!

Alex
Shopify Staff
Shopify Staff
1561 81 337

@Borbit thanks for the app ID. Can I also get a shop (ID or domain) and a time frame within the last 12 days? The more recent the better.

 

Cheers.

Alex | Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog

musubi
Shopify Partner
9 0 3

Hi @Alex having this issue as well. App ID: 2776423 Shop ID: 605341

 

Thanks for your help!