Telegram Proxy API

Local API target: http://localhost:7870

Use POST / with bot_token, method and method payload.

Webhook receiver: POST /webhook with bot_token in JSON body

Polling endpoint: POST /poll with bot_token, optional timeout/limit

Each payload below is ready to copy for testing.

sendMessage

Required: chat_id, text

Optional: parse_mode, disable_web_page_preview, disable_notification, reply_to_message_id

{
  "bot_token": "YOUR_BOT_TOKEN",
  "method": "sendMessage",
  "chat_id": 123456789,
  "text": "Hello from Telebot API!",
  "parse_mode": "HTML"
}

sendPhoto

Required: chat_id, photo

Optional: caption, parse_mode, disable_notification, reply_to_message_id

{
  "bot_token": "YOUR_BOT_TOKEN",
  "method": "sendPhoto",
  "chat_id": 123456789,
  "photo": "https://picsum.photos/800/600",
  "caption": "Test photo caption",
  "parse_mode": "HTML"
}

sendVideo

Required: chat_id, video

Optional: caption, parse_mode, duration, width, height, supports_streaming

{
  "bot_token": "YOUR_BOT_TOKEN",
  "method": "sendVideo",
  "chat_id": 123456789,
  "video": "https://samplelib.com/lib/preview/mp4/sample-5s.mp4",
  "caption": "Test video caption",
  "parse_mode": "HTML"
}

sendAudio

Required: chat_id, audio

Optional: caption, parse_mode, duration, performer, title

{
  "bot_token": "YOUR_BOT_TOKEN",
  "method": "sendAudio",
  "chat_id": 123456789,
  "audio": "https://samplelib.com/lib/preview/mp3/sample-3s.mp3",
  "caption": "Test audio caption"
}

sendAnimation

Required: chat_id, animation

Optional: caption, parse_mode, duration, width, height

{
  "bot_token": "YOUR_BOT_TOKEN",
  "method": "sendAnimation",
  "chat_id": 123456789,
  "animation": "https://media.giphy.com/media/ICOgUNjpvO0PC/giphy.gif",
  "caption": "Test animation caption"
}

sendDocument

Required: chat_id, document

Optional: caption, parse_mode, disable_content_type_detection

{
  "bot_token": "YOUR_BOT_TOKEN",
  "method": "sendDocument",
  "chat_id": 123456789,
  "document": "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf",
  "caption": "Test document caption"
}

sendVoice

Required: chat_id, voice

Optional: caption, parse_mode, duration

{
  "bot_token": "YOUR_BOT_TOKEN",
  "method": "sendVoice",
  "chat_id": 123456789,
  "voice": "https://samplelib.com/lib/preview/mp3/sample-3s.mp3",
  "caption": "Test voice caption"
}

sendVideoNote

Required: chat_id, video_note

Optional: duration, length, disable_notification

{
  "bot_token": "YOUR_BOT_TOKEN",
  "method": "sendVideoNote",
  "chat_id": 123456789,
  "video_note": "https://samplelib.com/lib/preview/mp4/sample-5s.mp4",
  "duration": 5,
  "length": 240
}

editMessageText

Required: chat_id, message_id, text

Optional: parse_mode, disable_web_page_preview, reply_markup

{
  "bot_token": "YOUR_BOT_TOKEN",
  "method": "editMessageText",
  "chat_id": 123456789,
  "message_id": 1,
  "text": "Edited message text",
  "parse_mode": "HTML"
}

editMessageCaption

Required: chat_id, message_id, caption

Optional: parse_mode, reply_markup

{
  "bot_token": "YOUR_BOT_TOKEN",
  "method": "editMessageCaption",
  "chat_id": 123456789,
  "message_id": 1,
  "caption": "Edited caption",
  "parse_mode": "HTML"
}

editMessageMedia

Required: chat_id, message_id, media

Optional: reply_markup

{
  "bot_token": "YOUR_BOT_TOKEN",
  "method": "editMessageMedia",
  "chat_id": 123456789,
  "message_id": 1,
  "media": {
    "type": "photo",
    "media": "https://picsum.photos/700/500",
    "caption": "Updated media caption"
  }
}

editMessageReplyMarkup

Required: chat_id, message_id, reply_markup

Optional: None

{
  "bot_token": "YOUR_BOT_TOKEN",
  "method": "editMessageReplyMarkup",
  "chat_id": 123456789,
  "message_id": 1,
  "reply_markup": {
    "inline_keyboard": [
      [
        {
          "text": "Open",
          "url": "https://t.me"
        }
      ]
    ]
  }
}

deleteMessage

Required: chat_id, message_id

Optional: None

{
  "bot_token": "YOUR_BOT_TOKEN",
  "method": "deleteMessage",
  "chat_id": 123456789,
  "message_id": 1
}

forwardMessage

Required: chat_id, from_chat_id, message_id

Optional: disable_notification

{
  "bot_token": "YOUR_BOT_TOKEN",
  "method": "forwardMessage",
  "chat_id": 123456789,
  "from_chat_id": 123456789,
  "message_id": 1
}

copyMessage

Required: chat_id, from_chat_id, message_id

Optional: caption, parse_mode, disable_notification, reply_to_message_id

{
  "bot_token": "YOUR_BOT_TOKEN",
  "method": "copyMessage",
  "chat_id": 123456789,
  "from_chat_id": 123456789,
  "message_id": 1,
  "caption": "Copied with new caption"
}

sendSticker

Required: chat_id, sticker

Optional: disable_notification, reply_to_message_id

{
  "bot_token": "YOUR_BOT_TOKEN",
  "method": "sendSticker",
  "chat_id": 123456789,
  "sticker": "CAACAgIAAxkBAAIBQmQAAf5n6hD8U9V8a5i2Qf0AAQABH3sAAh4AA8M4AAE2R0JxN7mA7zQE"
}

sendContact

Required: chat_id, phone_number, first_name

Optional: last_name, vcard, disable_notification, reply_to_message_id

{
  "bot_token": "YOUR_BOT_TOKEN",
  "method": "sendContact",
  "chat_id": 123456789,
  "phone_number": "+1234567890",
  "first_name": "Test",
  "last_name": "User"
}

sendLocation

Required: chat_id, latitude, longitude

Optional: horizontal_accuracy, live_period, heading, proximity_alert_radius

{
  "bot_token": "YOUR_BOT_TOKEN",
  "method": "sendLocation",
  "chat_id": 123456789,
  "latitude": 6.5244,
  "longitude": 3.3792
}

sendVenue

Required: chat_id, latitude, longitude, title, address

Optional: foursquare_id, foursquare_type, google_place_id, google_place_type

{
  "bot_token": "YOUR_BOT_TOKEN",
  "method": "sendVenue",
  "chat_id": 123456789,
  "latitude": 6.5244,
  "longitude": 3.3792,
  "title": "Test Venue",
  "address": "123 Test Street"
}

sendPoll

Required: chat_id, question, options

Optional: is_anonymous, type, allows_multiple_answers, correct_option_id, explanation

{
  "bot_token": "YOUR_BOT_TOKEN",
  "method": "sendPoll",
  "chat_id": 123456789,
  "question": "Do you like this API?",
  "options": [
    "Yes",
    "No"
  ]
}

setWebhook

Required: url

Optional: ip_address, max_connections, allowed_updates, drop_pending_updates, secret_token

{
  "bot_token": "YOUR_BOT_TOKEN",
  "method": "setWebhook",
  "url": "https://your-domain.com/webhook/YOUR_BOT_TOKEN"
}

deleteWebhook

Required: None

Optional: drop_pending_updates

{
  "bot_token": "YOUR_BOT_TOKEN",
  "method": "deleteWebhook",
  "drop_pending_updates": true
}

getWebhookInfo

Required: None

Optional: None

{
  "bot_token": "YOUR_BOT_TOKEN",
  "method": "getWebhookInfo"
}

getUpdates

Required: None

Optional: offset, limit, timeout, allowed_updates

{
  "bot_token": "YOUR_BOT_TOKEN",
  "method": "getUpdates",
  "timeout": 30,
  "allowed_updates": [
    "message",
    "callback_query"
  ]
}