Skip to main content
Anchor to customerAccessTokenCreate

customerAccessTokenCreate

mutation

Requires unauthenticated_write_customers access scope.

For legacy customer accounts only.

Creates a CustomerAccessToken using the customer's email and password. The access token is required to read or modify the Customer object, such as updating account information or managing addresses.

The token has an expiration time. Use customerAccessTokenRenew to extend the token before it expires, or create a new token if it's already expired.


Caution

This mutation handles customer credentials. Always transmit requests over HTTPS and never log or expose the password.


•CustomerAccessTokenCreateInput!
required

The fields used to create a customer access token.


Was this section helpful?

Anchor to CustomerAccessTokenCreatePayload returnsCustomerAccessTokenCreatePayload returns

•CustomerAccessToken

The newly created customer access token object.

•[CustomerUserError!]!
non-null

The list of errors that occurred from executing the mutation.

•[UserError!]!
non-nullDeprecated

The list of errors that occurred from executing the mutation.


Was this section helpful?