← Retour à l'accueil

Telegram API

Dernière mise à jour: 30.05.2026

This page describes the API for sending messages through a connected Telegram session.

1) Where to get the key

  • Open Catrina admin panel.
  • Go to Telegram posting.
  • In the sessions list, click API for the target session.
  • Copy the token from the API page. Use Refresh token if needed.

2) Send endpoint

POST /api/mtproto/send

Required JSON fields:

  • app — source application name
  • key — request identifier/key
  • token — token from the session API page
  • chat_id — Telegram chat/group ID
  • text — message text

3) Request example

curl -X POST "https://catrina.one/api/mtproto/send" \
  -H "Content-Type: application/json" \
  -d '{
    "app":"my-app",
    "key":"request-42",
    "token":"YOUR_TOKEN",
    "chat_id":"-1001234567890",
    "text":"Hello from API"
  }'

4) Task status

Sending runs through task queue. You get task_id in the send response.

Status endpoint:

GET /api/mtproto/send/{task_id}?token=YOUR_TOKEN

Possible statuses: queued, running, success, failed.