Skip to main content
BotMux provides a Telegram API proxy at /tgapi/ that transparently forwards requests to api.telegram.org and captures outgoing messages.

Why Use the API Proxy?

Telegram’s getUpdates only returns incoming messages — messages sent by the bot itself are not included. The API proxy solves this by intercepting send methods and saving the sent message to the database.

Setup

Change your backend’s API base URL:
# Before (direct)
https://api.telegram.org/bot{TOKEN}/sendMessage

# After (via BotMux proxy)
http://localhost:8080/tgapi/bot{TOKEN}/sendMessage
The proxy forwards all requests to Telegram and returns responses unchanged.

Captured Methods

MethodDescription
sendMessageText messages
sendPhotoPhotos
sendAudioAudio files
sendDocumentDocuments
sendVideoVideos
sendAnimationGIFs/animations
sendVoiceVoice messages
sendVideoNoteVideo notes
sendStickerStickers
sendLocationLocations
sendVenueVenues
sendContactContacts
sendPollPolls
sendDiceDice
forwardMessageForwarded messages
copyMessageCopied messages
editMessageTextEdited messages
The API Proxy URL is displayed in the bot detail view when proxy mode is enabled (click to copy).