Telegram Basics

Explaining some end-user concepts of the Telegram messenger

Daniel Weibel
5 min readMay 27, 2018

Telegram is an instant messaging application, comparable to WhatsApp, that is getting increasingly popular. However, the concepts used in Telegram are sometimes confusing, and also the documentation is not perfectly structured.

The following attempts to bring some clarity in this jungle.

Table of Contents

Peer Types

Peers are the “entities” with which you can interact in Telegram. They are shown as list items on the main screen of most Telegram apps. In the current version, there are four peer types in Telegram:

  • User: a regular Telegram user (registered with a phone number).
  • Bot: a special type of user that is a computer program instead of a human.
  • Group: a group chat consisting of a group of users and bots (called members).
  • Channel: a special type of group where only the admins can post messages, and all the other users and bots in the channel (called subscribers) can only listen.

Usernames

Telegram has the concept of usernames. In principle, a username makes a user, bot, group, or channel publicly accessible under a link of the form:

https://t.me/username

Usernames must be unique across the entire Telegram world, and users, bots, groups, and channels share the same namespace (that is, if a group has username foobar, then a user cannot also have username foobar).

Usernames are case-insensitive, must be at least 5-characters long, and may consist only of a-z, 0–9, and underscores.

For users, groups, and channels, a username is optional. Having a username basically makes a user, group, or channel public.

Users

By default, your user account doesn’t have a username. In this case, only people who have your phone number can send you messages.

If you set username username for your user account, then:

  • Anybody can send you messages through the link https://t.me/username.
  • You appear in the Telegram search under @username (and anybody can send you messages from there).

Groups

Only supergroups can set a username, basic groups cannot (see Groups below).

If you set username username for your supergroup, then:

  • Anybody can join your group through the link https://t.me/username.
  • Your group appears in the Telegram search under @username

Channels

If you set username username for your channel, then:

  • Anybody can subscribe to your channel through the link https://t.me/username.
  • Your channel appears in the Telegram search under @username.

Bots

Bots must have a username. The choice of a username is a step in the process of bot creation. This means that bots are always “public”.

If a bot has username username, then:

  • Anybody can send messages to the bot through the link https://t.me/username.
  • The bot appears in the Telegram search under under @username.

Username vs. Display Name

Don’t confuse usernames with display names. Every entity has a display name, regardless of whether they have a username or not.

The display name (or just name) is not unique. It may contain spaces, special characters, emojis, etc. You are able to define the display names for your user account, groups, channels, and bots. For your contacts that are saved with their number in your phone, the display name is the name under which these contacts are saved in your phone.

Entities that have a username, have in addition to the display name a username that is subject to the above restrictions. Usernames are often displayed with a leading @ (for example @username).

References

Bots

For bots, the following restrictions apply:

  • Must have a username.
  • Does not have a phone number.
  • Has restricted capabilities compared to regular users.
  • Uses the Bot API, which is a restricted version of the main Telegram API.
  • Cannot freely join groups and channels. Only an administrator of a group or channel can add a bot to a group or channel.

References

Groups

There are two types of groups, basic groups and supergroups.

By default, every newly created group is a basic group, but it can be upgraded to a supergroup.

Basic Group

A basic group can have up to 200 members (users and bots).

For adding users to the group, you have the following options:

  • Add somebody to the group from your Telegram contacts.
  • Add somebody to the group by their username (if they have a username).
  • Create an invite link through which anyone who has Telegram installed can join the group.

Note: for adding a bot to a group (of any type) that you are an administrator of, you have to go to the info of the bot contact and select Add To Group there.

Supergroup

Every basic group can be upgraded to a supergroup.

A supergroup can have up to 100,000 members (users and bots).

The main difference between a supergroup and a basic group is that a supergroup can be either private or public.

By default, a supergroup is private, but it can be made public.

Note: a basic group is always private, it cannot be made public, whereas for a supergroup, you can choose if you want it to be private or public.

Private Supergroup

For a private supergroup, there are the same options to add users as for a basic group. That is:

  • Add somebody to the group directly from your Telegram contacts.
  • Add somebody to the group by their username (if they have a username).
  • Create an invite link through which anyone who has Telegram installed can join the group.

Public Supergroup

Making a supergroup public means essentially choosing a Telegram username for this group.

The options for adding members to a public supergroup are still the same as for a private supergroup above, plus there is a link of the form https://t.me/username through which anybody can join the group.

References

Invite Links

As mentioned above, you can invite users to a group or channel with an invite link. This works, no matter whether the group or channel is public or private.

An invite link has the following form:

https://t.me/joinchat/<hash>

References

--

--

Daniel Weibel

Systems Programming | Software Development | Cloud Engineering | UNIX/Linux | Go | Kubernetes | AWS