Access denied for inventoryItem field. Required access: `read_inventory` access scope.

Navdeep1
Shopify Partner
8 0 0

Though I have provided permissions of "read_inventory" then on still calling this query getting this error

{
  products(first: 5) {
    edges {
      node {        
        id
        legacyResourceId
        hasOutOfStockVariants
        handle
        tracksInventory
        totalInventory
        productType        
        variants(first: 5) {
          edges {
            node {
              inventoryQuantity
              sku
              id
              availableForSale
              title
              displayName 
              inventoryPolicy
              inventoryItem {
              	  id
              }
            }
          }
        }
      }
    }
    pageInfo {
      hasNextPage
    }
  }
}
Reply 1 (1)

Liam
Shopify Staff
2731 292 743

Hi Navdeep1,

 

Hi Navdeep1,

 

This does seem unusual - just a few questions to confirm: 

 

  • Which API version are you using?
  • Did you try refreshing your access token
  • Are you using a tool like Insomnia to make API calls - if so there could be some configuration settings you need to change.
  • Can you test making the same query in the GraphiQL app, or making queries to different objects with this app? 

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