Anchor to section titled 'undefined'

customerAccessTokenCreate
mutation

Requires unauthenticated_write_customers access scope.

Creates a customer access token. The customer access token is required to modify the customer object in any way.


The fields used to create a customer access token.


Was this section helpful?

The newly created customer access token object.

The list of errors that occurred from executing the mutation.

The list of errors that occurred from executing the mutation. Use customerUserErrors instead.


Was this section helpful?

Examples

Hide code
DescriptionCopy
mutation customerAccessTokenCreate {
  customerAccessTokenCreate(input: {email: "ghaida@example.com", password: "7dx2gx2Z"}) {
    customerAccessToken {
      accessToken
    }
    customerUserErrors {
      message
    }
  }
}
Hide code
Response
JSON
{
  "customerAccessTokenCreate": {
    "customerAccessToken": {
      "accessToken": "ghaidas_token"
    },
    "customerUserErrors": []
  }
}