StaticGramBot API

sendChecklistПоддерживается

Use this method to send a checklist on behalf of a connected business account. On success, the sent Message is returned.

Особенности StaticGram

business_connection_id supported (see sendMessage)

Параметры

business_connection_idStringобязательный
Unique identifier of the business connection on behalf of which the message will be sent
chat_idInteger or Stringобязательный
Unique identifier for the target chat or username of the target bot in the format @username
checklistInputChecklistобязательный
A JSON-serialized object for the checklist to send
disable_notificationBooleanнеобязательный
Sends the message silently. Users will receive a notification with no sound.
protect_contentBooleanнеобязательный
Protects the contents of the sent message from forwarding and saving
message_effect_idStringнеобязательный
Unique identifier of the message effect to be added to the message
reply_parametersReplyParametersнеобязательный
A JSON-serialized object for description of the message to reply to
reply_markupInlineKeyboardMarkupнеобязательный
A JSON-serialized object for an inline keyboard

Пример запроса

curl
curl "https://api.staticgram.top/bot$TOKEN/sendChecklist" \
  -H "Content-Type: application/json" \
  -d '{
    "business_connection_id": "<business_connection_id>",
    "chat_id": 123456789,
    "checklist": {}
  }'
aiogram 3
from aiogram import Bot
from aiogram.client.session.aiohttp import AiohttpSession
from aiogram.client.telegram import TelegramAPIServer

session = AiohttpSession(api=TelegramAPIServer.from_base("https://api.staticgram.top"))
bot = Bot(TOKEN, session=session)

result = await bot.send_checklist(
    business_connection_id="<business_connection_id>",
    chat_id=123456789,
    checklist={},
)
JavaScript
const res = await fetch(`https://api.staticgram.top/bot${TOKEN}/sendChecklist`, {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    "business_connection_id": "<business_connection_id>",
    "chat_id": 123456789,
    "checklist": {}
  }),
});
const data = await res.json();

Ответ (Message)

JSON
{
  "ok": true,
  "result": {
    "message_id": 1,
    "date": 1790000000,
    "chat": {
      "id": 1780243423,
      "type": "private"
    }
  }
}

Описания методов и типов взяты из официальной документации Telegram Bot API (Bot API 10.3). Адрес API: https://api.staticgram.top