Have your say in Community Polls: What was/is your greatest motivation to start your own business?
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.

Re: Getting "Token must be eligible to manage storefront tokens." while trying to create s

Getting "Token must be eligible to manage storefront tokens." while trying to create storefronttoken

dry41016
Visitor
2 0 3

I have created an public app with sales channel enabled.

I have following scopes enabled on the shopify token that I received:

{
    "access_scopes": [
        {
            "handle": "write_script_tags"
        },
        {
            "handle": "write_customers"
        },
        {
            "handle": "write_products"
        },
        {
            "handle": "write_inventory"
        },
        {
            "handle": "unauthenticated_read_product_listings"
        },
        {
            "handle": "unauthenticated_write_checkouts"
        },
        {
            "handle": "unauthenticated_write_customers"
        },
        {
            "handle": "unauthenticated_read_customer_tags"
        },
        {
            "handle": "unauthenticated_read_content"
        },
        {
            "handle": "unauthenticated_read_product_tags"
        },
        {
            "handle": "read_script_tags"
        },
        {
            "handle": "read_customers"
        },
        {
            "handle": "read_products"
        },
        {
            "handle": "read_inventory"
        },
        {
            "handle": "unauthenticated_read_checkouts"
        },
        {
            "handle": "unauthenticated_read_customers"
        }
    ]
}

 

But when I try to create store front token with these request details:
POST {{shopurl}}admin/api/2021-04/storefront_access_tokens.json

Body: {
"storefront_access_token": {
"title": "Test"
}
}

I get status code 403 with following response body:

{
"errors": "Token must be eligible to manage storefront tokens."
}
Replies 3 (3)

dry41016
Visitor
2 0 3

Please help.

Luke_K
Shopify Staff
402 66 102

Hey @dry41016 

So,  a POST to the Admin API to storefront_access_tokens.json, provided the access token being passed in the call is a) the same as what you have in the app and b) indeed the app has the right scopes then it should just work. That 403 you'd received is returned when the assigned Token is not eligible to manage Storefront Tokens.

I would double check your Token (or possible create a new one). Let me know if that helps!

| Shopify |
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution!
heisenbaby
Tourist
7 0 2