ERROR: Token must be service access

Trazi
New Member
3 0 0

I created Node-React app today.
Shopify App CLI 1.8.0.

I used this boilerplate without any changes . I run this command -> `shopify create`. Select app name and development shop. It's all, any changes.
And after that, I get accessToken inside createShopifyAuth method (koa-shopify-auth). And get apiKey inside .env file (or from app settings on partners dashboard).


All GET/POST/DELETE requests from Admin API working fine. 


But for this app, I need a storefront token,
So I added the app to the sales channels and added all scopes to it: 

unauthenticated_read_product_listings,unauthenticated_read_product_tags,unauthenticated_write_checkouts,unauthenticated_read_checkouts,unauthenticated_write_customers,unauthenticated_read_customers,unauthenticated_read_customer_tags,unauthenticated_read_content   

If I do these requests:
GET/admin/api/2021-04/storefront_access_tokens.json
POST/admin/api/2021-04/storefront_access_tokens.json


I have 403:Forbidden
"errors": "Token must be service access."

What's wrong with Shopify Node-React start boilerplate?
What changes do I need to do inside my app code or Dashboard settings?
AccessToken generated from koa-shopify-auth not working for storefront requests.

P.S. I created a private app inside my development store. 
I added storefront access and only one scope (for example unauthenticated_read_product_listings scope).
After that, I get APIKEY + password from this private app.
As I see these settings the same as inside my Node-React app.

And...... I can do GET/POST admin/api/2021-04/storefront_access_tokens.json. 
And I get 200 status. And I can see shop storefront tokens.

f31a4d6d8667b70acefc8ab6a21b807a.png

 
0 Likes