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: Access token lacking requested scopes

Access token lacking requested scopes

kostyabek
Shopify Partner
4 0 0

I am building a Shopify Public App for (it is going to be unlisted). It is not embedded (back-end only), written in C# using ASP.NET Core with ShopifySharp library. Currently, I encounter a problem with requesting scopes (read_products and read_inventory, to be exact). I pass them on to authorization URL, but they are not shown in the list of permissions requested by the app. In addition, response with access token has empty scopes and the token does not allow viewing required resources.

 

Here is the authorization URL (with some replaced values):

https://myshop.myshopify.com/admin/oauth/authorize?client_id=my_client_id&scope=read_products,read_inventory&redirect_uri=my_redirect_uri

 

A screenshot of installation from client perspective (nothing about products/inventory):

image_2024-06-05_13-46-34.png

 

As far as I understand, TOML file configuration is not available for .NET-based projects, as Shopify CLI requires Node project. It was stated in the docs that manual auth code grant implementation is the alternative to using TOML.

Replies 2 (2)

Kyle_liu
Shopify Partner
421 53 76

Hi @kostyabek 

Have you executed the "shopify app deploy" command

If this is helpful, please Like and Accept the solution.
Want to modify or custom changes on store? Let me help.
- Feel free to contact me Email Me Buy Me A Coffee
kostyabek
Shopify Partner
4 0 0

As I said in the post - this is a .NET project, not Node. Shopify CLI "shopify app deploy" command expects valid package.json file in execution directory.

 

I managed to solve this issue simply by re-creating my Shopify App. I am not sure why it worked.