Is there any way to add new access scope to checkout UI extension?

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?

Hi there :waving_hand:

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.

Got it. Thank you @lizk

Hi Lizk - any update on this? I would also like to be able to access this scope from Checkout UI extensions.

@lizk is there any update to this yet or are we still unable to access quantityAvailable in checkout UI extensions?

Edit: found the docs stating what scopes are available in UI extensions: https://shopify.dev/docs/api/checkout-ui-extensions/2024-04/configuration#api-access still seems weird not all of them are available. And the error message is just plain wrong then.

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???

@frede-1994 I opened an issue on github about this 7 months ago, maybe if you added a comment there it might help bump it up in priority:

https://github.com/Shopify/ui-extensions/issues/1594