Bot API
A bot that talks with people in chats and groups
A bot is a special account with no phone number, owned by a person or a business, that speaks only through its token. People find it by username and tap “Start”.
- Every message type: text, photos, files, polls, location and product cards
- Buttons under a message, reply keyboards, and commands shown when typing
/
- Updates by long polling with
getUpdates, or by webhook
- Mini apps: a web page that opens inside the app with signed data
- Inline bots called with
@botname in any chat
- “No-code replies”: simple rules that answer at once, even without a server
- Connect a bot to a business account to answer customers in its name
# Send a message with buttons from a bot
TOKEN='<botId>:<secret>'
curl -s "https://www.engaz.net/bot/$TOKEN/sendMessage" \
-H 'content-type: application/json' -d '{
"conversationId": "CONV_ID",
"text": "Pick a size",
"replyMarkup": {"inlineKeyboard": [[
{"text": "Small", "callbackData": "size:s"},
{"text": "Large", "callbackData": "size:l"}
]]}}'
# Answer the button press
curl -s "https://www.engaz.net/bot/$TOKEN/answerCallbackQuery" \
-H 'content-type: application/json' \
-d '{"callbackQueryId": "CQ_ID", "text": "Large it is"}'
Every answer is { "ok": true, "result": … } or { "ok": false, "error": "…", "message": "…" }.