Fixed product bundle problem

Hi Shopify developers since i am trying to make fixed products bundle for my store since I am using headless so i don’t want to use any third party app so I am following Shopify official documentation for fixed bundling here is the reference link https://shopify.dev/docs/apps/selling-strategies/bundles/add-a-fixed-bundle which I am follow the problem is that it throughs an error while I run my query for updateproductcomponent after creating/ running create bundle product query and it created successfully but when I tried to run its next part it through an error user don’t have wite_access and also the user don’t have permission for “updtae variants relationship”

here is my queries and their responses

mutation CreateProductBundle($input: ProductInput!) {
  productCreate(input: $input) {
    product {
      title
      variants(first: 3) {
        edges{
          node{
            id
            price
          }
        }
      }
    }
    userErrors{
      field
      message
    }
  }
}

Input variables are

{
  "input": {
    "title": "Full Boxing Pack Bundle 4",
    "variants": [
      {
        "price": 300
      }
    ]
  }
}

Another query is

mutation CreateBundleComponents($input: [ProductVariantRelationshipUpdateInput!]!) {
  productVariantRelationshipBulkUpdate(input: $input) {
    parentProductVariants {
      id
      productVariantComponents(first: 10) {
        nodes{
          id
          quantity
          productVariant {
            id
          }
        }
      }
    }
    userErrors {
      code
      field
      message
    }
  }
}

And input variables are

{
  "input": [{
    "parentProductVariantId": "gid://shopify/ProductVariant/40206660436081",
    "productVariantRelationshipsToCreate": [
      {
        "id": "gid://shopify/ProductVariant/39829539618929",
        "quantity": 1
      },
      {
        "id": "gid://shopify/ProductVariant/39829539684465",
      "quantity": 1
      },
      {
        "id":"gid://shopify/ProductVariant/39829539651697",
        "quantity":1
      }
    ]
  }]
}

Response of this query is:

{
"data": {
"productVariantRelationshipBulkUpdate": null
},
"errors": [
{
"message": "Access denied for productVariantRelationshipBulkUpdate field. Required access: `write_products` access scope. Also: The user must have products permission to update variant relationships.",
"locations": [
{
"line": 2,
"column": 3
}
],
"path": [
"productVariantRelationshipBulkUpdate"
],
"extensions": {
"code": "ACCESS_DENIED",
"documentation": "https://shopify.dev/api/usage/access-scopes",
"requiredAccess": "`write_products` access scope. Also: The user must have products permission to update variant relationships."
}
}
],
"extensions": {
"cost": {
"requestedQueryCost": 32,
"actualQueryCost": 10,
"throttleStatus": {
"maximumAvailable": 1000,
"currentlyAvailable": 990,
"restoreRate": 50
}
}
}
}

Can you suggest what can be the problem I have also tried to make curl request using ADMIN_ACCESS_TOKEN but it did not work

Any luck? I’m running into the same issue.

Same issue here

same issue here

Is it because you’re not using the latest API version? Did you have the write_products access scope?

I have tried the 2023-07 and 2023-10 versions, with no success.
Also, when I make the below query, the write_products access scope is returned as expected.

By any chance, is Shopify Plus required? I am testing with a normal (non Shopify Plus) account).

Thanks.

query {
  appInstallation {
    accessScopes {
      handle
      description
    }
  }
}

No, I don’t think Plus is required. I can run the example code in the Shopify GraphiQL app before running in my code. You can try it again.

Same issue here.