The customer associated with the given access token. Tokens are obtained by using the customerAccessTokenCreate mutation.


Anchor to customerAccessToken
customerAccessToken
required

The customer access token.


Was this section helpful?

Anchor to Customer
Customer
Access requirements

A customer represents a customer account with the shop. Customer accounts store contact information for the customer, saving logged-in customers the trouble of having to provide it at every checkout.


Was this section helpful?
Get a customer by access token
Hide code
DescriptionCopy
query {
  customer(customerAccessToken: "bobs_token") {
    id
    firstName
    lastName
    acceptsMarketing
    email
    phone
  }
}
Hide code
Response
JSON
{
  "customer": {
    "id": "gid://shopify/Customer/410535040",
    "firstName": "John",
    "lastName": "Smith",
    "acceptsMarketing": false,
    "email": "johnsmith@example.com",
    "phone": "+16134504533"
  }
}