> For the complete documentation index, see [llms.txt](https://docs.tnid.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tnid.com/api-reference/001_user/002__authenticate_via_email.md).

# Authenticate As User Via Email

HTTP API `POST` `/auth/token`

To start using the API as a user you need to have a registered user account. And you need to get an OTP code sent to your email address.

## Request

```json
{
  "email": "test1@email.com",
  "otp_code": "2"
}
```

## Response

**HTTP Response Code:** 200

```json
{
  "access_token": "eyJERAMPLE.PAYLOAD1.SIGNATURE",
  "refresh_token": "eyJERAMPLE.PAYLOAD2.SIGNATURE"
}
```
