channelstringobbligatorio
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
}
}
]Seleziona un esempio per caricare i suoi input e il risultato nel 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.
Inizia a costruire
Endpoint API della piattaforma con autenticazione unificata e tracciamento dell'utilizzo.
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
}'Imposta la tua SandBase API key nell'ambiente del server. Le richieste usano l'autenticazione Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Conserva la tua key sul server. Non esporla nel codice del browser.
channelstringobbligatorioChannel username; post_id: Post ID; limit: number of comments (1-100).
post_idintegerobbligatorioPost ID
limitintegerNumber of comments
Risposta di esempio salvata per questa API; durante la visualizzazione non viene eseguita alcuna richiesta live.
[
{
"data": {
"channel": "example",
"comments": [],
"mtproto_required": true,
"note": "帖子评论需要在「设置」页启用并登录 MTProto 后端",
"post_id": 1
}
}
]Esplora altro
| API | Prezzo | Risposta |
|---|---|---|
Telegram Post CommentsQuesta API Telegram | $0.001 per chiamata | JSON |
Telegram | $0.008 per chiamata | JSON |
Telegram | $0.001 per chiamata | JSON |
Telegram | $0.001 per chiamata | JSON |
Telegram | $0.001 per chiamata | JSON |
Telegram | $0.001 per chiamata | JSON |
Domande
Invia una richiesta POST a https://api.sandbase.ai/v1/api/telegram/web/post-comments con la tua chiave API di SandBase nell'header Authorization (Bearer) e i parametri nel body JSON. Puoi anche provarla nel Playground di questa pagina senza scrivere codice.
$0.001 per chiamata. Ogni organizzazione riceve 100 chiamate gratuite al giorno UTC, condivise tra le API SandBase idonee, inclusa questa; dopo, ogni chiamata viene addebitata a questo prezzo dal tuo saldo SandBase. Non c'è alcun abbonamento.
Richiesti: channel (string) e post_id (integer). Facoltativi: limit (integer). La tabella dei parametri e il Playground di questa pagina elencano tutti i campi.
Una risposta JSON restituita nella stessa richiesta HTTP (sincrona). Il README di questa pagina include una risposta di esempio.
No. Telegram Post Comments funziona tramite SandBase, quindi una sola chiave API SandBase copre questo endpoint e tutte le altre API e modelli del catalogo. Non è necessario richiedere separatamente l'accesso alle API Telegram.