App must be configured to use the Storefront API or as a Sales Channel.

App must be configured to use the Storefront API or as a Sales Channel.

ahmed-adly-khal
Shopify Partner
1 0 0

i'm getting this error 

{"message":"Access denied for shopResourceFeedbackCreate field. Required access: `write_resource_feedbacks` access scope. Also: App must be configured to use the Storefront API or as a Sales Channel.","locations":[{"line":2,"column":2}],"path":["shopResourceFeedbackCreate"],"extensions":{"code":"ACCESS_DENIED","documentation":"https://shopify.dev/api/usage/access-scopes","requiredAccess":"`write_resource_feedbacks` access scope. Also: App must be configured to use the Storefront API or as a Sales Channel."}}

 when trying to create a storefront access token, this is the scopes from my shopify.app.toml

 

scopes = "read_products,write_products,read_customers,write_customers,read_orders,write_orders,unauthenticated_read_checkouts,unauthenticated_write_checkouts,unauthenticated_read_customers,unauthenticated_write_customers,unauthenticated_read_customer_tags,unauthenticated_read_content,unauthenticated_read_metaobjects,unauthenticated_read_product_listings,unauthenticated_read_product_tags,unauthenticated_read_selling_plans,unauthenticated_read_product_inventory,read_themes,write_resource_feedbacks"

 

the app is not a sales channel based on this https://shopify.dev/changelog/storefront-api-is-now-available-to-non-channel-apps and i can't find a way to configure it to use the storefront api

 

i can see this setting before selecting a distribution, however, after selecting app store distribution, it appears!

Screenshot 2023-06-13 at 5.59.50 PM.png

 

 

any ideas? 

Replies 2 (2)

Liam
Shopify Staff
2807 310 805

Hi Ahmed,

Are you using the StorefrontAccessToken resource to create the storefront access token?

Liam | Developer Advocate @ 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 Shopify.dev or the Shopify Web Design and Development Blog

sebastiandev
Shopify Partner
67 1 20

Hi @Liam 

 

I try to use StorefrontAccessToken resource to create the storefront access token but I have error: 

 

App must be a channel or have unauthenticated scopes to create a storefront access token.

 

Scopes of my app:
- unauthenticated_write_checkouts

- write_checkouts

- read_themes

And debug:

query {
  appInstallation {
    accessScopes {
      handle
      description
    }
  }
}

 

            [appInstallation] => Array
                (
                    [accessScopes] => Array
                        (
                            [0] => Array
                                (
                                    [handle] => read_themes
                                    [description] => Read theme templates and theme assets
                                )

                            [1] => Array
                                (
                                    [handle] => write_checkouts
                                    [description] => Modify checkouts
                                )

                            [2] => Array
                                (
                                    [handle] => unauthenticated_write_checkouts
                                    [description] => Modify checkouts
                                )

                            [3] => Array
                                (
                                    [handle] => read_checkouts
                                    [description] => Read checkouts
                                )

                            [4] => Array
                                (
                                    [handle] => unauthenticated_read_checkouts
                                    [description] => Read checkouts
                                )

                        )

                )
 
Any ideas?