---
title: "Generate Telegram code"
method: GET
path: "/v1/connect/telegram"
tags: ["Connect"]
---

# Generate Telegram code

`GET /v1/connect/telegram`

Generate an access code (valid 15 minutes) for connecting a Telegram channel or group. Add the bot as admin, then send the code + @yourchannel to the bot. Poll PATCH /v1/connect/telegram to check status.

## Query parameters

- `profileId` string, required

## Response `200`

Access code generated

- object
  - `code` string — The access code to send to the Telegram bot
  - `expiresAt` string, date-time — When the code expires
  - `expiresIn` integer — Seconds until expiration
  - `botUsername` string — The Telegram bot username to message
  - `instructions` string[] — Step-by-step connection instructions

## Other responses

- `400` — Profile ID required or invalid format
- `401` — Unauthorized
- `403` — No access to this profile
- `404` — Profile not found
- `500` — Internal error

---

[API](https://skmtc.net/zernio/apis/zernio-api.md) · [All operations](https://skmtc.net/zernio/apis/zernio-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/zernio/zernio-api/versions/f81ca70ea6b9/schema)
