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.
