Skip to main content
GET
/
auth
/
me
Get authenticated user
curl --request GET \
  --url https://store.salesive.com/api/v1/auth/me
{
  "status": 200,
  "success": true,
  "message": "Authenticated user retrieved successfully",
  "data": {
    "user": {
      "_id": "<string>",
      "name": "<string>",
      "email": "<string>",
      "role": "<string>"
    },
    "token": "<string>",
    "tokenExpiresAt": "2023-11-07T05:31:56Z"
  }
}

Request

GET /auth/me
Authorization: Bearer {token}
x-shop-id: {shopId}

Headers

HeaderTypeDescription
AuthorizationstringProvide the shopper token in the format Bearer <jwt>.
x-shop-idstringShop identifier to associate the user with your store.

Successful response

{
    "status": 200,
    "success": true,
    "message": "Authenticated user retrieved successfully",
    "data": {
        "user": {
            "_id": "669d5dcf3cc9c8596ec0f302",
            "name": "Jane Smith",
            "email": "jane@example.com",
            "phone": "08099887766",
            "role": "user",
            "shopRole": null,
            "stores": [],
            "avatar": "https://cdn.salesive.com/u/avatar.png",
            "authMethod": "google",
            "balance": 0,
            "deleted": false,
            "disabled": false,
            "createdAt": "2025-02-11T09:15:22.293Z",
            "updatedAt": "2025-11-12T18:04:55.121Z"
        },
        "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
        "tokenExpiresAt": "2026-07-09T08:43:17.000Z"
    }
}
You confirm the token is still valid when you receive the shopper profile and the tokenExpiresAt timestamp.

Error response

{
    "status": 401,
    "success": false,
    "message": "Authentication required",
    "data": {}
}
A 401 response means the token is missing, expired, or revoked. Prompt the shopper to re-authenticate before retrying.

Headers

x-shop-id
string

Optional identifier that scopes responses to a specific storefront when the referer cannot be inferred.

Response

User profile retrieved successfully.

status
integer
required
Example:

200

success
boolean
required
Example:

true

message
string
required
Example:

"Authenticated user retrieved successfully"

data
object
required