Hi everyone!
When I try to retrieve quantityAvailable via Storefront API, I got this error.
Access denied for quantityAvailable field. Required access: `unauthenticated_read_product_inventory` access scope.
I know unauthenticated_read_product_inventory is not the access scope that extensions initially have.
Is there any way to add new access scope to checkout UI extension?
At this time this scope is unavailable for the Storefront API via Checkout UI extensions. I have brought this to the attention of the team. You can also create a Github Issue requesting this scope be added.
How do you figure out a scope is unavaliable for Checkout UI extensions? This is really confusing and I wasted a lot of time debugging this behaviour. Looking at the documention from my error messages (“Access denied for quantityAvailable field. Required access: unauthenticated_read_product_inventory access scope.”)) it seems like it should work if you add the access scope to the TOML file following https://shopify.dev/api/usage/access-scopes).
And why are there some scopes unavailable or the Storefront API via Checkout UI extensions???