Skip to content

Telegram

Bot token (user-supplied). No global app credential — each user creates their own bot via @BotFather and pastes the token into the connect form. Sosyabot validates with getMe and getChatMember.

Authentication at a glance

FieldValue
Auth modelUser-supplied token
Required ENV(none)
Callback URL${BASE_URL}(no callback — POST /api/v1/social/telegram/connect)
Scopes / permissionsbot must be member or admin of every target chat
Auto token refreshNo — manual reconnect on expiry

ENV details

There is no TELEGRAM_* env block — bot credentials are submitted at connect time and stored in the channel record.

How to connect

  1. Create a bot via @BotFather/newbot. Save the token.
  2. Add the bot to every channel/group/chat you want to post to.
  3. Open ConnectionsTelegramConnect, paste the token + chat IDs.

Token refresh

Telegram bot tokens never expire. Reconnect only if you regenerate the token in @BotFather.

Notes

  • The bot must be added to each target chat as a member or admin before the chat ID will validate. Sosyabot returns a warning per chat where getChatMember reports the bot is not an admin.
  • Chat IDs accept both numeric (-100123456789) and @channelusername formats. Numeric IDs are stable; usernames change.
  • Text is truncated to 4096 chars and photo/video captions to 1024 chars per Telegram's API limits.

Troubleshooting

If the channel shows needs_reconnect, the access token was rejected by Telegram. Common causes:

  • The user revoked Sosyabot's authorization on the platform.
  • The platform invalidated the token (password change, security event).
  • Your OAuth app credentials rotated and the existing tokens no longer match.

Re-run the connect flow above. See Troubleshooting for the workspace-wide checklist.