Customer Access Token
Requires access scope.
A unique authentication token that identifies a logged-in customer and authorizes modifications to the Customer object. The token is required for customer-specific operations like updating profile information or managing addresses.
Tokens have an expiration date and must be renewed using before they expire. Create tokens with using legacy customer account authentication (email and password), or with for single sign-on flows.
Anchor to FieldsFields
- accessToken (String!)
- expiresAt (DateTime!)
- Anchor to accessTokenaccess•String!
Token non-null Token access required The customer’s access token.
- Anchor to expiresAtexpires•Date
At Time! non-null Token access required The date and time when the customer access token expires.
Anchor to MutationsMutations
- customerAccessTokenCreate (CustomerAccessTokenCreatePayload)
- customerAccessTokenCreateWithMultipass (CustomerAccessTokenCreateWithMultipassPayload)
- customerAccessTokenRenew (CustomerAccessTokenRenewPayload)
- customerActivate (CustomerActivatePayload)
- customerActivateByUrl (CustomerActivateByUrlPayload)
- customerReset (CustomerResetPayload)
- customerResetByUrl (CustomerResetByUrlPayload)
- customerUpdate (CustomerUpdatePayload)
- •mutation
For legacy customer accounts only.
Creates a
using the customer's email and password. The access token is required to read or modify theCustomerobject, such as updating account information or managing addresses.The token has an expiration time. Use
to extend the token before it expires, or create a new token if it's already expired.CautionThis mutation handles customer credentials. Always transmit requests over HTTPS and never log or expose the password.
Caution:This mutation handles customer credentials. Always transmit requests over HTTPS and never log or expose the password.
Caution: This mutation handles customer credentials. Always transmit requests over HTTPS and never log or expose the password.
- Anchor to inputinput•Customer
Access Token Create Input! required The fields used to create a customer access token.
Arguments
- •mutation
Creates a
using a multipass token instead of email and password. This enables single sign-on for customers who authenticate through an external system.If the customer doesn't exist in Shopify, then a new customer record is created automatically. If the customer exists but the record is disabled, then the customer record is re-enabled.
CautionMultipass tokens are only valid for 15 minutes and can only be used once. Generate tokens on-the-fly when needed rather than in advance.
Caution:Multipass tokens are only valid for 15 minutes and can only be used once. Generate tokens on-the-fly when needed rather than in advance.
Caution: Multipass tokens are only valid for 15 minutes and can only be used once. Generate tokens on-the-fly when needed rather than in advance.
- Anchor to multipassTokenmultipass•String!
Token required A valid multipass token to be authenticated.
Arguments
- •mutation
Extends the validity of a
before it expires. The renewed token maintains authenticated access to customer operations.Renewal must happen before the token's
time. If a token has already expired, then useto generate a new token with the customer's credentials.CautionStore access tokens securely. Never store tokens in plain text or insecure locations, and avoid exposing them in URLs or logs.
Caution:Store access tokens securely. Never store tokens in plain text or insecure locations, and avoid exposing them in URLs or logs.
Caution: Store access tokens securely. Never store tokens in plain text or insecure locations, and avoid exposing them in URLs or logs.
- Anchor to customerAccessTokencustomer•String!
Access Token required The access token used to identify the customer.
Arguments
- •mutation
Activates a customer account using an activation token received from the
mutation. The customer sets their password during activation and receives afor authenticated access.For a simpler approach that doesn't require parsing the activation URL, use
instead.CautionThis mutation handles customer credentials. Always use HTTPS and never log or expose the password or access token.
Caution:This mutation handles customer credentials. Always use HTTPS and never log or expose the password or access token.
Caution: This mutation handles customer credentials. Always use HTTPS and never log or expose the password or access token.
- •ID!required
Specifies the customer to activate.
- Anchor to inputinput•Customer
Activate Input! required The fields used to activate a customer.
Arguments
- •ID!
- •mutation
Activates a customer account using the full activation URL from the
mutation. This approach simplifies activation by accepting the complete URL directly, eliminating the need to parse it for the customer ID and activation token. Returns afor authenticating subsequent requests.CautionStore the returned access token securely. It grants access to the customer's account data.
Caution:Store the returned access token securely. It grants access to the customer's account data.
Caution: Store the returned access token securely. It grants access to the customer's account data.
- Anchor to activationUrlactivation•URL!
Url required The customer activation URL.
- Anchor to passwordpassword•String!required
A new password set during activation.
Arguments
- •mutation
Resets a customer's password using the reset token from a password recovery email. On success, returns the updated
Customerand a newfor immediate authentication.Use the
mutation to send the password recovery email that provides the reset token. Alternatively, useif you have the full reset URL instead of the customer ID and token.CautionThis mutation handles sensitive customer credentials. Validate password requirements on the client before submission.
Caution:This mutation handles sensitive customer credentials. Validate password requirements on the client before submission.
Caution: This mutation handles sensitive customer credentials. Validate password requirements on the client before submission.
- •ID!required
Specifies the customer to reset.
- Anchor to inputinput•Customer
Reset Input! required The fields used to reset a customer’s password.
Arguments
- •ID!
- •mutation
Resets a customer's password using the reset URL from a password recovery email. The reset URL is generated by the
mutation.On success, returns the updated
Customerand a newfor immediate authentication.CautionThis mutation handles customer credentials. Ensure the new password is transmitted securely and never logged or exposed in client-side code.
Caution:This mutation handles customer credentials. Ensure the new password is transmitted securely and never logged or exposed in client-side code.
Caution: This mutation handles customer credentials. Ensure the new password is transmitted securely and never logged or exposed in client-side code.
- Anchor to resetUrlreset•URL!
Url required The customer's reset password url.
- Anchor to passwordpassword•String!required
New password that will be set as part of the reset password process.
Arguments
- •mutation
Updates a customer's personal information such as name, password, and marketing preferences. Requires a valid
to authenticate the customer making the update.If the customer's password is updated, then all previous access tokens become invalid. The mutation returns a new access token in the payload to maintain the customer's session.
CautionPassword changes invalidate all existing access tokens. Ensure your app handles the new token returned in the response to avoid logging the customer out.
Caution:Password changes invalidate all existing access tokens. Ensure your app handles the new token returned in the response to avoid logging the customer out.
Caution: Password changes invalidate all existing access tokens. Ensure your app handles the new token returned in the response to avoid logging the customer out.
- Anchor to customerAccessTokencustomer•String!
Access Token required The access token used to identify the customer.
- Anchor to customercustomer•Customer
Update Input! required The customer object input.
Arguments