Appearance
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
| Field | Value |
|---|---|
| Auth model | User-supplied token |
| Required ENV | (none) |
| Callback URL | ${BASE_URL}(no callback — POST /api/v1/social/telegram/connect) |
| Scopes / permissions | bot must be member or admin of every target chat |
| Auto token refresh | No — 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
- Create a bot via @BotFather →
/newbot. Save the token. - Add the bot to every channel/group/chat you want to post to.
- Open Connections → Telegram → Connect, 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
getChatMemberreports the bot is not an admin. - Chat IDs accept both numeric (
-100123456789) and@channelusernameformats. 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.