Skip to main content

Get Logged User

GET /auth/user

Description

Returns the current authenticated user's basic account data.

Request Parameters

Requires Authentication: true

Send a valid bearer token in the Authorization header.

Usage Example

await axios.get("https://api.daykeeper.app/auth/user", {
headers: {
Authorization: `Bearer ${accessToken}`,
},
})

Success Response

{
"message": "User data",
"user": {
"_id": "65cbaab84b9d1cce41e98b60",
"username": "johndoe",
"displayName": "John Doe",
"email": "johndoe@example.com",
"profile_picture": {
"title": "DaykeeperPFP.png",
"key": "public/DaykeeperPFP.png",
"url": ""
},
"roles": ["user"],
"verified_email": true,
"timeZone": "America/New_York",
"private": false
}
}

Error Response

CodeDescription
401Missing, invalid, or expired token
404User not found
500Server error