curl -X POST "https://core.chatto.is/api/v1/bot/$TOKEN/sendMessage" \
-H 'Content-Type: application/json' \
-d '{
"chat_id": 7,
"text": "Привет! Выберите город",
"reply_markup": {
"inline_keyboard": [
[
{
"text": "Москва",
"callback_data": "city:msk"
},
{
"text": "Сайт",
"url": "https://chatto.is"
}
]
]
}
}'
import requests
r = requests.post(
f"{BASE}/bot/{TOKEN}/sendMessage",
json={
"chat_id": 7,
"text": "Привет! Выберите город",
"reply_markup": {
"inline_keyboard": [
[
{
"text": "Москва",
"callback_data": "city:msk"
},
{
"text": "Сайт",
"url": "https://chatto.is"
}
]
]
}
},
)
print(r.json())
const r = await fetch(`${BASE}/bot/${TOKEN}/sendMessage`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
"chat_id": 7,
"text": "Привет! Выберите город",
"reply_markup": {
"inline_keyboard": [
[
{
"text": "Москва",
"callback_data": "city:msk"
},
{
"text": "Сайт",
"url": "https://chatto.is"
}
]
]
}
}),
});
console.log(await r.json());
{
"message_id": 777,
"chat": {
"id": 7,
"type": "private"
},
"text": "Привет! Выберите город",
"date": 1759300001
}