Get the signed-in identity
const url = 'https://apibase.ecomweb.app/api/v1/tenant/stores/example/auth/me';const options = { method: 'GET', headers: { 'x-storefront-api-key': '<x-storefront-api-key>', Authorization: 'Bearer <token>' }};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://apibase.ecomweb.app/api/v1/tenant/stores/example/auth/me \ --header 'Authorization: Bearer <token>' \ --header 'x-storefront-api-key: <x-storefront-api-key>'Returns the signed-in shopper’s identity, the sign-in methods linked to it and the name, avatar and phone of their customer record. Send the shopper’s access token as the customerToken bearer token. The body is empty when the identity no longer exists.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The store’s ref, as returned by GET /stores.
Responses
Section titled “Responses”object
The sign-in methods linked to the identity, such as password or google.
Identity ID (a UUID).
Email address, or null for an anonymous session.
Whether the shopper has proved they own the email address.
True for a session issued by the anonymous route.
ID of the customer record linked to this identity, as a string, or null when there is none yet.
The customer’s name, or null.
The customer’s avatar URL, or null.
The customer’s phone number, or null.
Example generated
{ "linked_providers": [ "example" ], "id": "example", "email": "example", "email_verified": true, "is_anonymous": true, "customer_id": "example", "name": "example", "avatar_url": "example", "phone": "example"}The key is missing, invalid, revoked or expired.
object
The HTTP status code.
What went wrong; validation failures list one message per problem.
The HTTP status text, such as Bad Request.
object
A stable, machine-readable error code.
A human-readable explanation.
Extra context about the error, when there is any.
object
When the error happened, as an ISO 8601 timestamp.
Example generated
{ "statusCode": 1, "message": [ "example" ], "error": "example"}The key may not do this: a missing scope, a readonly key, a publishable key on a Store API route, or a disallowed origin.
object
The HTTP status code.
What went wrong; validation failures list one message per problem.
The HTTP status text, such as Bad Request.
object
A stable, machine-readable error code.
A human-readable explanation.
Extra context about the error, when there is any.
object
When the error happened, as an ISO 8601 timestamp.
Example generated
{ "statusCode": 1, "message": [ "example" ], "error": "example"}