Dedicated to the Hydrogen framework, headless commerce, and building custom storefronts using the Storefront API.
When I try this graphQL mutation
mutation MyMutation {
checkoutCreate(input: {lineItems: {quantity: 1, variantId: "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC80MjgwMzkwMzg4OTYzOQ=="}, email: "ajay+2@gmail.com"}) {
checkout {
createdAt
id
email
lineItems(first: 10) {
edges {
node {
id
}
}
}
}
}
}
I am getting the error as
{
"data": {
"checkoutCreate": null
},
"errors": [
{
"message": "Access denied for checkoutCreate field. Required access: `unauthenticated_write_checkouts` access scope.",
"locations": [
{
"line": 2,
"column": 3
}
],
"path": [
"checkoutCreate"
],
"extensions": {
"code": "ACCESS_DENIED",
"documentation": "https://shopify.dev/api/usage/access-scopes",
"requiredAccess": "`unauthenticated_write_checkouts` access scope."
}
}
]
}
Already enabled the storefront API access scopes - unauthenticated_write_checkouts, unauthenticated_read_checkouts. Then why this error is getting.
I am also getting this error, any suggestions?
Hello @Lekha1
I have checked in my store account it`s not working.
checkoutCreate might be deprecated
https://shopify.dev/docs/api/storefront/2023-01/mutations/checkoutcreate
You can also refer the above link.
Check it the alternative solution. Or share your store access so that I can check and let you know the exact solution.
Please share your store issue. I will check and give you the suggestion.
Thanks....