Loading...
Loading...
Interact with Telegram Bot API: send messages/photos/files/videos/audio/stickers/polls to any chat/group/channel, manage groups (pin/unpin/ban/kick/promote/restrict/set title/description/photo), forward/copy/delete/edit messages, react to messages, create invite links, manage forum topics, inline keyboards, and more. Use for ANY Telegram operation.
npx skill4agent add ninehills/skills telegramBOT_TOKEN=$(curl -s http://localhost:23001/api/settings | jq -r '.telegram.botToken')# JSON body (most methods)
curl -s "https://api.telegram.org/bot${BOT_TOKEN}/<METHOD>" \
-H "Content-Type: application/json" \
-d '{ ... }'
# Multipart form (file uploads)
curl -s "https://api.telegram.org/bot${BOT_TOKEN}/<METHOD>" \
-F "chat_id=<CHAT_ID>" \
-F "photo=@/path/to/file.jpg" \
-F "caption=optional caption"# Current chat (ALMA_CHAT_ID auto-set)
alma send photo /path/to/img.jpg "caption"
alma send file /path/to/doc.pdf "caption"
alma send audio /path/to/song.mp3
alma send video /path/to/vid.mp4
# Group operations
alma group list
alma group send <chatId> "text"
alma group send-photo <chatId> /path "caption"
alma group send-document <chatId> /path "caption"
alma group send-video <chatId> /path "caption"
alma group history <chatId> [limit]
alma group search <chatId> "query"
alma group context <chatId>
alma group pin <chatId> <msgId>
alma group unpin <chatId> [msgId]
alma group leave <chatId>
alma group patrol
# Direct message & message mgmt
alma dm <userId> "message"
alma msg delete <chatId> <msgId>
alma msg react <chatId> <msgId> <emoji> # Add reaction to a message (e.g. ❤️ 😂 👍)
alma msg sticker <chatId> <sticker_file_id> # Send a sticker (use file_id from received stickers)
alma msg sticker-search [set_name] # List sticker sets (no args) or index a specific set
alma msg sticker-find <emoji> # Find stickers by emoji across all indexed sets| Method | Description |
|---|---|
| Send text message. Params: |
| Send photo. |
| Send file. |
| Send video. |
| Send GIF. |
| Send audio. |
| Send voice message. |
| Send round video. |
| Send sticker. |
| Send location. |
| Send venue. |
| Send contact. |
| Send poll. |
| Send dice/slot. |
| Send album (2-10 items). |
| Show typing/uploading status. |
| Stream partial message. |
| Method | Description |
|---|---|
| Forward message. |
| Forward multiple. |
| Copy without "Forwarded" header. |
| Copy multiple. |
| Method | Description |
|---|---|
| Edit text. |
| Edit caption. |
| Edit media. |
| Edit inline keyboard. |
| Update live location. |
| Stop live location. |
| Delete message. |
| Delete multiple. |
| Method | Description |
|---|---|
| React to message. |
| Method | Description |
|---|---|
| Get chat info. |
| Member count. |
| Get one member's info. |
| List admins. |
| Set title. |
| Set description. |
| Set photo. |
| Delete photo. |
| Set default permissions. |
| Set sticker set. |
| Remove sticker set. |
| Leave chat. |
| Pin message. |
| Unpin message. |
| Unpin all. |
| Method | Description |
|---|---|
| Ban user. |
| Unban user. |
| Restrict user. |
| Promote to admin. |
| Set admin title. |
| Approve join request. |
| Decline join request. |
| Method | Description |
|---|---|
| Create new primary link. |
| Create invite link. |
| Edit invite link. |
| Revoke link. |
| Paid subscription link. |
| Method | Description |
|---|---|
| Create topic. |
| Edit topic. |
| Close topic. |
| Reopen topic. |
| Delete topic. |
| Unpin all in topic. |
| Get available topic icons |
| Edit General topic. |
| Close General. |
| Reopen General. |
| Hide General. |
| Unhide General. |
| Method | Description |
|---|---|
| Get bot info |
| Set bot name. |
| Get bot name |
| Set bot description. |
| Get bot description |
| Set short description. |
| Get short description |
| Set bot profile photo. |
| Remove bot profile photo |
| Set command list. |
| Get commands |
| Delete commands |
| Set menu button. |
| Get menu button |
| Set default admin rights. |
| Get default admin rights |
| Method | Description |
|---|---|
| Get profile photos. |
| Get profile audios. |
| Method | Description |
|---|---|
| Get file download info. |
// reply_markup for inline buttons
{
"inline_keyboard": [
[{"text": "Button 1", "callback_data": "btn1"}, {"text": "URL", "url": "https://example.com"}],
[{"text": "Row 2", "callback_data": "btn2"}]
]
}| Method | Description |
|---|---|
| Answer callback from inline button. |
| Method | Description |
|---|---|
| Send sticker. |
| Get sticker set. |
| Get custom emoji. |
| Create sticker set. |
| Add sticker. |
| Reorder. |
| Delete sticker. |
| Set title. |
| Set thumbnail. |
| Method | Description |
|---|---|
| Send invoice. |
| Create payment link |
| Answer shipping. |
| Answer checkout. |
| Refund stars. |
| Method | Description |
|---|---|
| Send game. |
| Set score. |
| Get scores. |
curl -s "https://api.telegram.org/bot${BOT_TOKEN}/sendMessage" \
-H "Content-Type: application/json" \
-d '{"chat_id": "@channel_username", "text": "Hello!"}'curl -s "https://api.telegram.org/bot${BOT_TOKEN}/sendPhoto" \
-H "Content-Type: application/json" \
-d '{
"chat_id": "'$ALMA_CHAT_ID'",
"photo": "https://example.com/image.jpg",
"caption": "Check this out!",
"reply_markup": {"inline_keyboard": [[{"text":"👍 Like","callback_data":"like"},{"text":"👎","callback_data":"dislike"}]]}
}'curl -s "https://api.telegram.org/bot${BOT_TOKEN}/forwardMessage" \
-H "Content-Type: application/json" \
-d '{"chat_id": "<TARGET>", "from_chat_id": "<SOURCE>", "message_id": 123}'curl -s "https://api.telegram.org/bot${BOT_TOKEN}/sendPoll" \
-H "Content-Type: application/json" \
-d '{"chat_id": "'$ALMA_CHAT_ID'", "question": "Best language?", "options": [{"text":"Rust"},{"text":"TypeScript"},{"text":"Python"}], "is_anonymous": false}'curl -s "https://api.telegram.org/bot${BOT_TOKEN}/sendMessage" \
-H "Content-Type: application/json" \
-d '{"chat_id": "'$ALMA_CHAT_ID'", "text": "Replying!", "reply_parameters": {"message_id": 5678}}'curl -s "https://api.telegram.org/bot${BOT_TOKEN}/promoteChatMember" \
-H "Content-Type: application/json" \
-d '{"chat_id": "<GROUP>", "user_id": 12345, "can_pin_messages": true, "can_invite_users": true}'curl -s "https://api.telegram.org/bot${BOT_TOKEN}/sendDocument" \
-F "chat_id=$ALMA_CHAT_ID" \
-F "document=@/path/to/file.pdf" \
-F "caption=Here's the document"curl -s "https://api.telegram.org/bot${BOT_TOKEN}/sendMediaGroup" \
-H "Content-Type: application/json" \
-d '{"chat_id": "'$ALMA_CHAT_ID'", "media": [
{"type":"photo","media":"https://example.com/1.jpg","caption":"First"},
{"type":"photo","media":"https://example.com/2.jpg"}
]}'curl -s "https://api.telegram.org/bot${BOT_TOKEN}/createChatInviteLink" \
-H "Content-Type: application/json" \
-d '{"chat_id": "<GROUP>", "name": "My Link", "member_limit": 100}'@channel_username-100-F-d"HTML"<b>bold</b> <i>italic</i> <code>code</code> <a href="url">link</a>[msg:xxx]