Making requests
One address, the method name at the end, and JSON back.
GET|POST https://app.cordice.org/api/v1/bot<token>/<method>
Exactly Telegram’s shape. https://app.cordice.org/api/v1/bot/<token>/<method> works too.
Parameters
Send them as JSON, as a form (application/x-www-form-urlencoded, with objects as JSON strings), or in the query string.
curl https://app.cordice.org/api/v1/bot$TOKEN/sendMessage \
-H 'content-type: application/json' \
-d '{"chat_id": "1234567890123456789", "text": "Hello from a bot"}'
Responses
{ "ok": true, "result": { … } }
{ "ok": false, "error_code": 400, "description": "chat not found" }
When you are going too fast the answer is 429 with parameters.retry_after in seconds — the field every library already waits on. See limits.
What a chat_id is
A group the bot is in, or a person who has a chat with the bot. A bot cannot start a conversation with someone who has never opened one with it.