> ## Documentation Index
> Fetch the complete documentation index at: https://docs.aigenda.tech/llms.txt
> Use this file to discover all available pages before exploring further.

# Current user

> Returns the account the token belongs to. Handy for checking a token.

## Response

<ResponseField name="id" type="integer">
  User ID.
</ResponseField>

<ResponseField name="username" type="string">
  Login.
</ResponseField>

<ResponseField name="email" type="string">
  Email.
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X GET "https://api.aigenda.tech/api/users/me/" \
    -H "Authorization: Bearer <access>"
  ```

  ```python Python theme={null}
  import requests

  response = requests.get(
      "https://api.aigenda.tech/api/users/me/",
      headers={"Authorization": "Bearer <access>"},
      timeout=30,
  )
  response.raise_for_status()
  print(response.json())
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch("https://api.aigenda.tech/api/users/me/", {
    method: "GET",
    headers: { Authorization: "Bearer <access>" },
  });
  const data = await response.json();
  console.log(data);
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "id": 777,
    "username": "you@example.com",
    "email": "you@example.com"
  }
  ```

  ```json 401 theme={null}
  {
    "detail": "Given token not valid for any token type",
    "code": "token_not_valid"
  }
  ```
</ResponseExample>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.