Telegram API Wrapper
Base URL
https://api.prosto-guyy.workers.dev/
Authentication
All requests require the following header:
Authorization: Bearer <API_KEY>
Methods
POST /sendMessage
Sends a text message.
Parameters: Same as the official Telegram Bot API sendMessage.
Example
curl -X POST https://api.prosto-guyy.workers.dev/sendMessage \
-H "Authorization: Bearer <API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"chat_id": 123456789,
"text": "Hello!"
}'
POST /sendDocument
Sends a document.
Parameters: Same as the official Telegram Bot API sendDocument.
Supports application/json and multipart/form-data, including file uploads.
Example
curl -X POST https://api.prosto-guyy.workers.dev/sendDocument \
-H "Authorization: Bearer <API_KEY>" \
-F "chat_id=123456789" \
-F "document=@file.pdf"
Responses
Responses follow the original Telegram Bot API format.
Success
{
"ok": true,
"result": {}
}
Error
{
"ok": false,
"description": "Bad Request"
}
HTTP Status Codes
| Status | Description |
|---|---|
| 200 | Request successful |
| 400 | Telegram API error |
| 401 | Invalid API key |
| 404 | Unsupported method |
| 405 | Method not allowed |
| 502 | Upstream error |