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
200Request successful
400Telegram API error
401Invalid API key
404Unsupported method
405Method not allowed
502Upstream error

Reference

Telegram Bot API Documentation