---
search:
  tags:
    - Telegram
    - POST
seo:
  description: >-
    Makes a one-time code, valid for ten minutes and for one use, that the user…
    Reference for the POST /v1/me/telegram/link-code endpoint in the INVICTUS
    API.
sidebar:
  label: A one-time code that links a Telegram chat.
  badge: POST
title: A one-time code that links a Telegram chat.
type: openapi-operation
---
Makes a one-time code, valid for ten minutes and for one use, that the user sends to the bot to link a Telegram chat to this account. A new code ends the one before it; 409 `telegram_linked` when a chat is already linked.

`POST /v1/me/telegram/link-code`

**Responses**

- `201` — Success.
- `401` — No session, or it ended.
- `409` — In conflict with the current state.
- `429` — Too many requests; \`retryAfterSeconds\` says when to ask again.
- `500` — Server error.

Response example, 201:

```json
{
  "code": "string",
  "expiresAt": 1793145600
}
```
