editStoryЧастично
Edits a story previously posted by the bot on behalf of a managed business account. Requires the can_manage_stories business bot right. Returns Story on success.
Поддерживается частично
replaces media/caption/areas; same area limits as postStory
Параметры
Unique identifier of the business connection
Unique identifier of the story to edit
Content of the story
Caption of the story, 0-2048 characters after entities parsing
Mode for parsing entities in the story caption. See formatting options for more details.
A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode
Пример запроса
curl
curl "https://api.staticgram.top/bot$TOKEN/editStory" \
-H "Content-Type: application/json" \
-d '{
"business_connection_id": "<business_connection_id>",
"story_id": 1,
"content": {}
}'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.edit_story(
business_connection_id="<business_connection_id>",
story_id=1,
content={},
)JavaScript
const res = await fetch(`https://api.staticgram.top/bot${TOKEN}/editStory`, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
"business_connection_id": "<business_connection_id>",
"story_id": 1,
"content": {}
}),
});
const data = await res.json();Ответ (Story)
JSON
{
"ok": true,
"result": {
"chat": {
"id": 1780243423,
"type": "private"
},
"id": 1780243423
}
}