curl --request GET \
--url https://api.example.com/api/users{
"status": "<string>",
"data": {
"user": {
"id": 123,
"fullname": "<string>",
"email": "<string>"
}
}
}Retrieves the currently authenticated user information
curl --request GET \
--url https://api.example.com/api/users{
"status": "<string>",
"data": {
"user": {
"id": 123,
"fullname": "<string>",
"email": "<string>"
}
}
}Documentation Index
Fetch the complete documentation index at: https://mintlify.com/zulfikarrosadi/juadah-backend/llms.txt
Use this file to discover all available pages before exploring further.
accessToken cookie.
deserializeToken middleware - Extracts and verifies the JWT token from the accessToken cookierequiredLogin middleware - Ensures the user is authenticated before accessing the endpoint"success" for successful requests.curl --request GET \
--url https://juadah-backend.vercel.app/api/users \
--header 'Cookie: accessToken=your_access_token_here'
{
"status": "success",
"data": {
"user": {
"id": 1,
"fullname": "zulfikar",
"email": "email@example.com"
}
}
}
| Status Code | Description |
|---|---|
| 401 | User is not authenticated. Access token is missing or expired. |
| 400 | Invalid or malformed access token. |
res.locals.user, which is populated by the deserializeToken middleware after successfully validating the JWT token from the accessToken cookie.
credentials: 'include' in fetch or similar settings in other HTTP clients.