---
title: "Fetch specific channel messages by id"
method: GET
path: "/v1/channels/{peer_id}/messages"
tags: ["Channels"]
---

# Fetch specific channel messages by id

`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

Returns the listed message ids from a single channel.

## Path parameters

- `peer_id` integer, required

## Query parameters

- `ids` string, required

## Response `200`

Requested messages.

- MessagesEnvelope: Messages list with related chats/users. Used by history, replies, and channel-messages-by-id endpoints.
  - `chats` Chat[]
    - `autotranslation` boolean: True if auto-translation is enabled.
    - `broadcast` boolean: True if this is a broadcast channel.
    - `date` integer: Unix timestamp the chat was created.
    - `fake` boolean: True if Telegram has flagged this chat as fake.
    - `forum` boolean: True if this is a forum (channel with topics).
    - `gigagroup` boolean: True if this is a gigagroup (broadcast-only supergroup).
    - `id` integer: Chat peer id. Pass this as `peer_id` to channel/peer endpoints.
    - `join_request` boolean: True if join requires admin approval.
    - `join_to_send` boolean: True if posting requires joining.
    - `left` boolean: True if the viewer has left this chat.
    - `level` integer: Boost level.
    - `linked_monoforum_id` integer: Linked monoforum id (if any).
    - `megagroup` boolean: True if this is a supergroup.
    - `min` boolean: True if the record is a stripped (min) representation.
    - `noforwards` boolean: True if content protection (no forwards) is enabled.
    - `participants_count` integer: Approximate participant count (may be 0 if not exposed).
    - `photo` Photo: Photo metadata. The image bytes are not returned; clients fetch them out-of-band.
      - `dcid` integer: Telegram data-center id where the photo lives.
      - `flags` integer: Bitfield flags.
      - `has_video` boolean: True if the photo has a video preview.
      - `photo_id` integer: Photo id.
      - `stripped_thumb` string: Base64-ish stripped JPEG thumbnail; can be expanded client-side.
    - `restricted` boolean: True if this chat is restricted (see `restriction_reason`).
    - `restriction_reason` object[], nullable: Reasons for any restriction.
    - `scam` boolean: True if Telegram has flagged this chat as a scam.
    - `signatures` boolean: True if posts show their author.
    - `slowmode_enabled` boolean: True if slow mode is on.
    - `title` string: Public display title of the chat.
    - `username` string: Primary public @username (empty if private).
    - `usernames` UsernameAlias[], nullable: All public usernames bound to this chat.
      - `active` boolean: True if the alias is currently active.
      - `editable` boolean: True if the alias can be edited (only true for the primary one).
      - `flags` integer: Bitfield of optional Telegram fields.
      - `username` string: The alias text (no leading @).
    - `verified` boolean: True if Telegram has verified this chat.
  - `count` integer: Total number of messages matching the query (may exceed the returned page).
  - `flags` integer: Bitfield of optional Telegram fields.
  - `inexact` boolean: True if `count` is an estimate.
  - `messages` Message[]
    - `date` integer: Unix timestamp when sent.
    - `edit_date` integer: Unix timestamp of the last edit, or 0 if never edited.
    - `entities` object[]: Inline message entities (bold, mention, url, etc.).
    - `forwards` integer: Forward count.
    - `from_id` Peer: Telegram peer reference. Exactly one of `user_id`, `chat_id`, or `channel_id` is set, identifying the peer type.
      - `channel_id` integer: Set when this peer is a channel or supergroup.
      - `chat_id` integer: Set when this peer is a legacy basic group chat.
      - `user_id` integer: Set when this peer is a user (1:1 chat partner or contact).
    - `fwd_from` object, nullable: Forwarded-from envelope. Present only if the message was forwarded.
    - `grouped_id` integer: Album group id; messages with the same value belong to one album.
    - `id` integer: Message id within its peer.
    - `media` object, nullable: Attached media (photo / video / document / poll / webpage). Shape varies by type.
    - `media_unread` boolean: True if the media is unread.
    - `mentioned` boolean: True if the viewer is mentioned in this message.
    - `message` string: Plain-text body of the message.
    - `noforwards` boolean: True if forwarding is disabled.
    - `out` boolean: True if the message was outgoing from the viewer's perspective.
    - `peer_id` Peer: Telegram peer reference. Exactly one of `user_id`, `chat_id`, or `channel_id` is set, identifying the peer type.
      - `channel_id` integer: Set when this peer is a channel or supergroup.
      - `chat_id` integer: Set when this peer is a legacy basic group chat.
      - `user_id` integer: Set when this peer is a user (1:1 chat partner or contact).
    - `pinned` boolean: True if pinned.
    - `post` boolean: True if this is a channel post (rather than a chat message).
    - `post_author` string: Display name of the post's author (signed broadcasts).
    - `reactions` object, nullable: Aggregated reaction counts.
    - `replies` object, nullable: Reply thread summary (count, latest reply id). 0 replies if no discussion.
    - `reply_markup` object, nullable: Inline keyboard / reply markup, if attached.
    - `reply_to` object, nullable: Reply / thread reference. Present only if the message is a reply.
    - `silent` boolean: True if the message was sent without notification.
    - `views` integer: View count (broadcast channels only).
  - `next_page` string: Opaque cursor for the next (older) page. Pass back as `?cursor=`. Absent when no further page exists.
  - `offset_id_offset` integer: Absolute position of `messages[0]` in the full result set.
  - `prev_page` string: Opaque cursor for the previous (newer) page. Pass back as `?cursor=`. Absent when already on the first page.
  - `pts` integer: State-update counter; opaque to callers.
  - `topics` object[], nullable: Forum topics referenced by the messages, if the chat is a forum.
  - `users` User[]
    - `bot` boolean: True if this account is a bot.
    - `close_friend` boolean: Close-friend flag.
    - `contact` boolean: Contact-relationship flag.
    - `deleted` boolean: True if the account has been deleted.
    - `fake` boolean: True if Telegram has flagged this account as fake.
    - `first_name` string: First name (may be empty for deleted accounts).
    - `id` integer: User peer id. Pass this as `peer_id` to `/v1/users/{peer_id}`.
    - `lang_code` string: BCP-47-ish locale code reported by the client (e.g. "en", "ru").
    - `last_name` string: Last name (may be empty).
    - `mutual_contact` boolean: True if the contact relationship is mutual.
    - `phone` string: Phone number in international format. Empty unless the caller has visibility.
    - `photo` Photo: Photo metadata. The image bytes are not returned; clients fetch them out-of-band.
      - `dcid` integer: Telegram data-center id where the photo lives.
      - `flags` integer: Bitfield flags.
      - `has_video` boolean: True if the photo has a video preview.
      - `photo_id` integer: Photo id.
      - `stripped_thumb` string: Base64-ish stripped JPEG thumbnail; can be expanded client-side.
    - `premium` boolean: True if this account has Telegram Premium.
    - `restricted` boolean: True if this user is restricted (see `restriction_reason`).
    - `restriction_reason` object[], nullable: Reasons for any restriction. Null when not restricted.
    - `scam` boolean: True if Telegram has flagged this account as a scam.
    - `status` object, nullable: Online status object (varies by privacy settings).
    - `username` string: Primary public @username (empty if the user has none).
    - `usernames` UsernameAlias[], nullable: All public usernames bound to this user (some accounts collect multiple).
      - `active` boolean: True if the alias is currently active.
      - `editable` boolean: True if the alias can be edited (only true for the primary one).
      - `flags` integer: Bitfield of optional Telegram fields.
      - `username` string: The alias text (no leading @).
    - `verified` boolean: True if Telegram has verified this user.

## Other responses

- `400`: Invalid request — bad path or query parameter.
- `404`: Not found.
- `409`: The peer id could not be found, so no access hash exists for it. Not transient: seed the id via GET /v1/usernames/{username}, GET /v1/phones/{phone}, or by encountering it in a chat, then retry. Raw MTProto ids only: a Bot-API id like -1001234567890 must be sent as 1234567890 (strip the leading -100), and -123456789 as 123456789. When the request carries such an id, the hint names the exact id to retry with.
- `429`: Rate limit exceeded.
- `503`: Service temporarily unavailable.
- `504`: Request timed out.

---

[API](https://skmtc.dev/tgatlas/apis/tgatlas-telegram-channel-data-api.md) · [All operations](https://skmtc.dev/tgatlas/apis/tgatlas-telegram-channel-data-api/llms.txt) · [OpenAPI document](https://skmtc.dev/tgatlas/apis/tgatlas-telegram-channel-data-api/revisions/875ce0155fe9?raw)
