Starting a conversation
Resolve a user by their Telegram user ID to open their private chat. Telegram bots cannot create groups. Usespace.get(chatId) for an existing group, supergroup, or channel, and stringify numeric Telegram chat IDs.
Documentation Index
Fetch the complete documentation index at: /docs/llms.txt
Use this file to discover all available pages before exploring further.
Start Telegram conversations and review supported provider features.
space.get(chatId) for an existing group, supergroup, or channel, and stringify numeric Telegram chat IDs.
const tg = telegram(app);
const user = await tg.user("123456789");
const space = await tg.space.create(user);
await space.send("Hello from Spectrum.");
const group = await tg.space.get(process.env.TELEGRAM_CHAT_ID!);
await group.send("Hello, existing group.");
| Feature | Support |
|---|---|
| Text messages | Send and receive |
| Markdown | Send, rendered as Telegram HTML via parse_mode |
| Streaming text / markdown | Send, with native draft preview in private chats |
| Media, photos, documents, audio, and video | Send and receive |
| Reactions | Send and receive |
| Threaded replies | Send and receive |
| Typing indicators | Send |
| Message edits | Send and receive, including text and markdown |
| Custom Bot API calls | Send with custom({ method, params }) content |
Was this page helpful?