Channels

Fetch specific channel messages by id

Returns the listed message ids from a single channel.

get/v1/channels/{peer_id}/messages

Request

  • Base URL: https://telegram155.p.rapidapi.com
  • URL: https://telegram155.p.rapidapi.com/v1/channels/{peer_id}/messages
  • Auth: none declared

Path parameters

peer_idinteger required

Numeric Telegram peer id (channel or user). Obtain from /v1/usernames/{username}, /v1/phones/{phone}, /v1/contacts/search, or any prior response's peer.user_id / peer.channel_id field.

Query parameters

idsstring required

Comma-separated list of message ids (e.g. 519,518,517). Maximum 100.

Response

Requested messages.

countinteger

Total number of messages matching the query (may exceed the returned page).

flagsinteger

Bitfield of optional Telegram fields.

inexactboolean

True if count is an estimate.

next_pagestring

Opaque cursor for the next (older) page. Pass back as ?cursor=. Absent when no further page exists.

offset_id_offsetinteger

Absolute position of messages[0] in the full result set.

prev_pagestring

Opaque cursor for the previous (newer) page. Pass back as ?cursor=. Absent when already on the first page.

ptsinteger

State-update counter; opaque to callers.

topicsobject[] nullable

Forum topics referenced by the messages, if the chat is a forum.

Changes

No recorded changes to this operation across all 1 revision of this API.