channelstringจำเป็น
Channel username; post_id: Post ID; limit: number of comments (1-100).
https://api.sandbase.ai/v1/api/telegram/web/post-commentsReturns comments from the linked discussion group of a specified Telegram channel post. Filters include the channel username, post ID, and an optional limit.
[
{
"data": {
"channel": "example",
"comments": [],
"mtproto_required": true,
"note": "帖子评论需要在「设置」页启用并登录 MTProto 后端",
"post_id": 1
}
}
]เลือกตัวอย่างเพื่อโหลดอินพุตและผลลัพธ์ลงใน playground
Returns comments from the linked discussion group of a Telegram channel post. It needs the channel username in channel and the numeric post_id. An optional limit sets how many comments to return.
curl -X POST "https://api.sandbase.ai/v1/api/telegram/web/post-comments" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"channel": "telegram", "post_id": 450}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
channel | string | Yes | Channel username; post_id: Post ID; limit: number of comments (1-100). |
post_id | integer | Yes | Post ID |
limit | integer | No | Number of comments |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"channel": "telegram",
"comments": [],
"mtproto_required": true,
"note": "帖子评论需要在「设置」页启用并登录 MTProto 后端",
"post_id": 450
}
| Field | Meaning |
|---|---|
channel | The channel username that the request used. |
post_id | The ID of the post that the request asked about. |
comments | List of comments on the post. In the sample response it is empty []. |
mtproto_required | When true, the call needs an MTProto backend to be enabled and logged in before it can return comments. |
note | Text message that explains why the result is empty. In the sample it says post comments need MTProto to be enabled and logged in on the settings page. |
@ sign, for example telegram.limit accepts whole numbers from 1 to 100.mtproto_required first. If it is true, comments stays empty and note explains the reason.$0.001 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.
เริ่มสร้าง
เอ็นด์พอยต์ของ Platform API ที่มีการยืนยันตัวตนและการติดตามการใช้งานแบบรวมศูนย์
curl -X POST "https://api.sandbase.ai/v1/api/telegram/web/post-comments" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"channel": "example",
"post_id": 1
}'ตั้งค่า SandBase API key ของคุณในสภาพแวดล้อมฝั่งเซิร์ฟเวอร์ คำขอจะใช้การยืนยันตัวตนแบบ Bearer
export SANDBASE_API_KEY="YOUR_API_KEY"เก็บ key ไว้บนเซิร์ฟเวอร์ อย่าเปิดเผยในโค้ดฝั่งเบราว์เซอร์
channelstringจำเป็นChannel username; post_id: Post ID; limit: number of comments (1-100).
post_idintegerจำเป็นPost ID
limitintegerNumber of comments
บันทึกตัวอย่างการตอบกลับสำหรับ API นี้; จะไม่มีการส่งคำขอจริงเมื่อเปิดดู
[
{
"data": {
"channel": "example",
"comments": [],
"mtproto_required": true,
"note": "帖子评论需要在「设置」页启用并登录 MTProto 后端",
"post_id": 1
}
}
]สำรวจเพิ่มเติม
| API | ราคา | การตอบกลับ |
|---|---|---|
Telegram Post CommentsAPI นี้ Telegram | $0.001 ต่อการเรียก | JSON |
Telegram | $0.008 ต่อการเรียก | JSON |
Telegram | $0.001 ต่อการเรียก | JSON |
Telegram | $0.001 ต่อการเรียก | JSON |
Telegram | $0.001 ต่อการเรียก | JSON |
Telegram | $0.001 ต่อการเรียก | JSON |
คำถาม
ส่งคำขอ POST ไปที่ https://api.sandbase.ai/v1/api/telegram/web/post-comments โดยใส่ SandBase API key ของคุณใน Authorization header (Bearer) และส่งพารามิเตอร์เป็น JSON body คุณยังสามารถลองใช้ได้ใน Playground บนหน้านี้โดยไม่ต้องเขียนโค้ด
$0.001 ต่อครั้ง ทุกองค์กรจะได้รับคำขอฟรี 100 ครั้งต่อวัน UTC โดยใช้ร่วมกันใน SandBase APIs ที่เข้าเงื่อนไขรวมถึงรายการนี้ หลังจากนั้นแต่ละคำขอจะคิดค่าบริการตามราคานี้จากยอดคงเหลือ SandBase ของคุณ ไม่มีค่าสมาชิกรายเดือน
ที่ต้องระบุ: channel (string) และ post_id (integer). ตัวเลือก: limit (integer). ตาราง Parameters และ Playground ในหน้านี้แสดงทุกฟิลด์
การตอบกลับ JSON ที่ส่งกลับในคำขอ HTTP เดียวกัน (แบบซิงโครนัส) README บนหน้านี้มีตัวอย่างการตอบกลับ
ไม่จำเป็น Telegram Post Comments ทำงานผ่าน SandBase ดังนั้น SandBase API key เดียวครอบคลุม endpoint นี้และทุก API กับโมเดลอื่นในแค็ตตาล็อก คุณไม่ต้องสมัครขอสิทธิ์เข้าถึง Telegram API แยกต่างหาก