Skip to content

Telegram

URL Format

telegram://token@telegram?chats=channel-1[,chat-id-1,...]

URL Fields

  • Token (Required)
    URL part: telegram://token@telegram/

Query/Param Props

Props can be either supplied using the params argument, or through the URL using
?key=value&key=value etc.

  • Chats - Chat IDs or Channel names (using @channel-name) (Required)
    Aliases: channels

  • Notification - If disabled, sends Message silently
    Default: ✔ Yes

  • ParseMode - How the text Message should be parsed
    Default: None
    Possible values: None, Markdown, HTML, MarkdownV2

  • Preview - If disabled, no web page preview will be displayed for URLs
    Default: ✔ Yes

  • Title - Notification title, optionally set by the sender
    Default: empty

Getting a token for Telegram

Talk to the botfather.

Identifying the target chats/channels

The chats param consists of one or more Chat IDs or channel names.

Channels

The channel names can be retrieved in the telegram client in the Channel info section. Replace the t.me/ prefix from the link with a @.

Note

Channels names need to be prefixed by @ to identify them as such.

Chats

Group chats and private chats are identifieds by Chat IDs. Unfortunatly, they are generally not visible in the telegram clients. The easiest way to retrieve them is by using the shoutrrr generate telegram command which will guide you through creating a URL with your target chats.

Tip

You can use the containrrr/shoutrrr image in docker to run it without download/installing the shoutrrr CLI using:

docker run --rm -it containrrr/shoutrrr generate telegram

Optional parameters

You can optionally specify the notification, parseMode and preview parameters in the URL:

telegram://token@telegram/?channels=channel&notification=no&preview=false&parseMode=html

See the telegram documentation for more information.

Note

preview and notification are inverted in regards to their API counterparts (disable_web_page_preview and disable_notification)

Parse Mode and Title

If a parse mode is specified, the message needs to be escaped as per the corresponding sections in Formatting options.

When a title has been specified, it will be prepended to the message, but this is only supported for the HTML parse mode. Note that, if no parse mode is specified, the message will be escaped and sent using HTML.

Since the markdown modes are really hard to escape correctly, it's recommended to stick to HTML parse mode.