Skip to content
DashboardGet API Key

Get current user

users.retrieve_current() -> UserRetrieveCurrentResponse
GET/v1/users/me

Returns the identity associated with the authenticated API token.

ReturnsExpand Collapse
class UserRetrieveCurrentResponse:
name: str

Display name of the API token.

Get current user

import os
from chamelaion import Chamelaion

client = Chamelaion(
    api_key=os.environ.get("CHAMELAION_API_KEY"),  # This is the default and can be omitted
)
response = client.users.retrieve_current()
print(response.name)
{
  "name": "My API Token"
}
{
  "error": "missing authorization header"
}
{
  "error": "invalid authorization format"
}
{
  "error": "missing token"
}
{
  "error": "invalid token"
}
{
  "error": "unauthorized"
}
{
  "error": "internal error"
}
Returns Examples
{
  "name": "My API Token"
}
{
  "error": "missing authorization header"
}
{
  "error": "invalid authorization format"
}
{
  "error": "missing token"
}
{
  "error": "invalid token"
}
{
  "error": "unauthorized"
}
{
  "error": "internal error"
}