Responses

  • 200 application/json

    Successful Response

    Hide response attributes Show response attributes object
    • user_id integer Required
    • username string Required
    • avatar string | null Required
    • role_id integer Required
    • created_at integer Required
  • 503 application/json

    Database connection error

    Hide response attribute Show response attribute object
    • detail string

      Default value is Can't connect to MySQL server on '[SERVER]'.

  • 401 application/json

    Invalid access token

    Hide response attribute Show response attribute object
    • detail string

      Default value is Couldn't validate credentials.

  • 403 application/json

    Access token not entered

    Hide response attribute Show response attribute object
    • detail string

      Default value is Not authenticated.

GET /api/users/me
curl \
 -X GET https://lztup.toil.cc/api/users/me \
 -H "Authorization: Bearer $ACCESS_TOKEN"
Response examples (200)
{
  "user_id": 42,
  "username": "string",
  "avatar": "string",
  "role_id": 42,
  "created_at": 42
}
Response examples (503)
{
  "detail": "Can't connect to MySQL server on '[SERVER]'"
}
Response examples (401)
{
  "detail": "Couldn't validate credentials"
}
Response examples (403)
{
  "detail": "Not authenticated"
}