---
search:
  tags:
    - auth
    - POST
seo:
  description: >-
    Send a code of the authenticator app, or an unused recovery… Reference for
    the POST /api/v1/auth/two-factor/verify endpoint in the TimescaleDB
    Enterprise API.
  noindex: true
sidebar:
  label: Give the second factor
  badge: POST
title: Give the second factor
type: openapi-operation
---
Send a code of the authenticator app, or an unused recovery code. Sets a new session cookie. A failed code counts toward the login lockout. The step expires 5 minutes after the password login.

`POST /api/v1/auth/two-factor/verify`

**Request body** (`application/json`, required)

- `code` (string) — The 6-digit code of the authenticator app
- `recovery_code` (string) — An unused recovery code, in place of the code

Request body example:

```json
{
  "code": "string",
  "recovery_code": "string"
}
```

**Responses**

- `200` — OK
- `default` — Error

Response example, 200:

```json
{
  "ok": true
}
```
