Endpoints
POST
/en/mock/loginSend email and password as JSON; returns a token and user.
GET
/en/mock/profileSend Authorization: Bearer mock-token-en to get the current user; returns 401 otherwise.
Fields
| Field | Type | Description |
|---|---|---|
email | string | Login email (request) |
password | string | Any non-empty password (request) |
token | string | Fixed mock token (response) |
user | object | Current user (response) |
Notes
- The token is a fixed mock value, not a real credential. Do not use real passwords.
Example
curl -X POST "https://www.temp-api.com/en/mock/login" \
-H "Content-Type: application/json" \
-d '{"email":"emily.carter@example.com","password":"demo"}'
{
"code": 200,
"message": "ok",
"data": {
"token": "mock-token-en",
"user": { "id": 1, "name": "Emily Carter", "role": "admin" }
}
}