Telegram

Fetch a public Telegram channel's posts or a post with comments

Channel refs (@handle, handle, t.me URL) return channel info + recent posts newest-first (views, reactions, media, polls, link previews); pass query to search within the channel's history and page with before=<next_cursor>. Post refs (t.me/<channel>/<id>) return the post plus its most recent discussion comments. Media URLs are Telegram CDN links that expire within hours. Public channels with a web preview only.

post/api/v1/telegram/get

Request

  • Base URL: https://glim.sh
  • URL: https://glim.sh/api/v1/telegram/get
  • Auth: one of:
    • none
    • API key in header x-api-key
    • HTTP bearer
    • API key in query parameter apiKey

Request body

refstring required

Public channel ref (@handle, handle, or t.me URL) returns the channel feed; a post ref (t.me/<channel>/<id> or '<channel>/<id>') returns that post with its discussion comments.

querystring

Search within the channel's full history (channel refs only)

beforestring

Return posts older than this message id (pagination cursor from next_cursor)

afterstring

Return posts newer than this message id

limitinteger

Max posts for channel refs (walks history pages as needed)

include_commentsboolean

Post refs: include discussion comments. Telegram's public embed serves a small window of the most recent comments; walk older ones by re-calling with comment=<oldest returned comment id>. Availability varies by channel - many discussion groups are not exposed on the public web preview.

commentstring

Post refs: center the comment window on this comment id (walks older comments)

Response

Telegram resource

object required

Changes

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