repostStory
Reposts a story between business accounts (Bot API 9.3).
Returns: On success, returns Story.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
business_connection_id | String | Yes | Business connection ID |
from_chat_id | Integer | Yes | Identifier of the chat which posted the story |
from_story_id | Integer | Yes | Identifier of the story to repost |
active_period | Integer | Yes | Active period in seconds: 21600, 43200, 86400 or 172800 |
post_to_chat_page | Boolean | Optional | Keep the story accessible after it expires |
protect_content | Boolean | Optional | Protect content from forwarding and screenshotting |
Example request
curl
curl -s -X POST "https://api.telegram.org/bot$TOKEN/repostStory" \
-H "Content-Type: application/json" \
-d '{
"business_connection_id": "BUSINESS_CONNECTION_ID",
"from_chat_id": 123456789,
"from_story_id": 1,
"active_period": 86400
}'
Python
import requests
TOKEN = "123456789:AAEexampleTokenReplaceWithYours"
resp = requests.post(
f"https://api.telegram.org/bot{TOKEN}/repostStory",
json={
"business_connection_id": "BUSINESS_CONNECTION_ID",
"from_chat_id": 123456789,
"from_story_id": 1,
"active_period": 86400
},
timeout=30,
)
print(resp.json())
JavaScript
const TOKEN = "123456789:AAEexampleTokenReplaceWithYours";
const res = await fetch(`https://api.telegram.org/bot${TOKEN}/repostStory`, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
"business_connection_id": "BUSINESS_CONNECTION_ID",
"from_chat_id": 123456789,
"from_story_id": 1,
"active_period": 86400
}),
});
console.log(await res.json());
Step-by-step guide: How to Create a Telegram Bot: Step by Step with BotFather and Python
Related methods
postStoryPosts a story on behalf of a business account.editStoryEdits a story on behalf of a business account.deleteStoryDeletes a story on behalf of a business account.