channelstringrequerido
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
}
}
]Seleccione un ejemplo para cargar sus entradas y el resultado en el 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.
Empiece a construir
Endpoint de la API de la plataforma con autenticación unificada y seguimiento de uso.
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
}'Configure su clave de API de SandBase en el entorno de su servidor. Las solicitudes usan autenticación Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Conserve su clave en el servidor. No la exponga en código del navegador.
channelstringrequeridoChannel username; post_id: Post ID; limit: number of comments (1-100).
post_idintegerrequeridoPost ID
limitintegerNumber of comments
Respuesta de ejemplo guardada para esta API; no se realiza ninguna solicitud en vivo al verla.
[
{
"data": {
"channel": "example",
"comments": [],
"mtproto_required": true,
"note": "帖子评论需要在「设置」页启用并登录 MTProto 后端",
"post_id": 1
}
}
]Explorar más
| API | Precio | Respuesta |
|---|---|---|
Telegram Post CommentsEsta API Telegram | $0.001 por llamada | JSON |
Telegram | $0.008 por llamada | JSON |
Telegram | $0.001 por llamada | JSON |
Telegram | $0.001 por llamada | JSON |
Telegram | $0.001 por llamada | JSON |
Telegram | $0.001 por llamada | JSON |
Preguntas
Envía una solicitud POST a https://api.sandbase.ai/v1/api/telegram/web/post-comments con tu clave API de SandBase en el encabezado Authorization (Bearer) y los parámetros como un cuerpo JSON. También puedes probarlo en el Playground de esta página sin escribir código.
$0.001 por llamada. Cada organización obtiene 100 llamadas gratis por día UTC, compartidas entre las APIs elegibles de SandBase, incluida esta; después, cada llamada se factura a este precio desde tu saldo de SandBase. No hay suscripción.
Requeridos: channel (string) y post_id (integer). Opcionales: limit (integer). La tabla de Parámetros y el Playground de esta página enumeran todos los campos.
Una respuesta JSON devuelta en la misma solicitud HTTP (sincrónica). El README de esta página incluye una respuesta de ejemplo.
No. Telegram Post Comments funciona a través de SandBase, así que una sola clave API de SandBase cubre este endpoint y todas las demás APIs y modelos del catálogo. No necesitas solicitar acceso a la API de Telegram por separado.