Access Inventory Quantity

Hello Shopify Community,

I am facing an issue while working on my Shopify app. When a product is out of stock, I receive an error message. To handle this, I attempted to fetch the product’s quantity using inventoryQuantity and availableQuantity in my query. However, I keep encountering an “Access Denied” error.

I have already enabled the unauthenticated_read_product_inventory scope, which should allow me to access inventory data, but the issue persists.

What API call or process exactly is performed before the error message appears? Did you re-deploy your app after adding the unauthenticated_read_product_inventory scope?