Files
bookhoard/docs/developer/api/users/get_profile.md
T
John O'Keefe 6156ff6154 fix(docs): record keep_screen_awake in the get_profile example
TestDocsMatchRoutes flagged the example response as missing a key the
handler emits — drift introduced by c645b8e2 (the wake-lock preference),
surfaced while regenerating the API mirrors for the retry endpoint.
2026-10-27 13:23:09 -04:00

48 lines
927 B
Markdown

---
method: GET
path: /api/auth/profile
auth: jwt
area: authentication
---
<!-- source: internal/handlers/auth.go:530 AuthHandler.GetProfile -->
# Get Current User Profile
Retrieve the current authenticated user's profile.
**Endpoint**: `GET /api/auth/profile`
**Auth**: Required
## Request Headers
| Header | Type | Required | Description |
| ------------- | ------ | -------- | ------------ |
| Authorization | string | Yes | Bearer token |
### Example Request
```http
GET /api/auth/profile
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
```
## Response (200 OK)
```json example-response
{
"id": "uuid",
"email": "user@example.com",
"username": "john",
"first_name": "John",
"last_name": "Doe",
"role": "user",
"keep_screen_awake": true
}
```
## Error Responses
| Code | Description |
| ---- | ------------------------ |
| 401 | Invalid or expired token |