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}

Headers

HeaderTypeDescription
Content-TypestringAlways set to application/json.
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": "Amina Okafor",
            "email": "[email protected]",
            "role": "user",
            "avatar": "https://cdn.salesive.com/u/amina.png",
            "stores": ["68b8f52575da81b332af29f1"],
            "createdAt": "2025-02-11T09:15:22.293Z",
            "updatedAt": "2025-11-12T18:04:55.121Z"
        },
        "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
        "tokenExpiresAt": "2026-01-18T14:22:10.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