Telegram Bot API
🌐 Bahasa Indonesia

repostStory

Kategori: Story · Bot API 10.3 · Dokumentasi resmi

Memposting ulang story antar-akun bisnis (Bot API 9.3).

Nilai kembalian: Jika berhasil, mengembalikan Story.

Parameter

ParameterTipeWajibDeskripsi
business_connection_idStringYaID koneksi bisnis
from_chat_idIntegerYaID chat yang memposting story
from_story_idIntegerYaID story yang akan diposting ulang
active_periodIntegerYaPeriode aktif dalam detik: 21600, 43200, 86400 atau 172800
post_to_chat_pageBooleanOpsionalBiarkan story tetap dapat diakses setelah kedaluwarsa
protect_contentBooleanOpsionalLindungi konten dari penerusan dan tangkapan layar

Deskripsi parameter berupa ringkasan singkat; lihat dokumentasi resmi untuk teks lengkapnya.

Contoh permintaan

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());

Panduan langkah demi langkah: Cara Membuat Bot Telegram: dari BotFather sampai Pesan Pertama