Articles:
Learn how to set up a Telegram bot to automate tasks and improve communication. Follow our guide to effectively engage with users via Telegram.
In this article:
When setting up a private group in Telegram, you will need to connect a bot. It is needed so that the participant can receive payment notifications, as well as to link the contact in Kwiga with the participant in Telegram, and in the future also for mailings and other notifications in Telegram. Adding participants to the group and removing them from the group will happen automatically. You can use an existing bot or create a new one that will be used only for a specific private group or for all notifications in your project. Most commonly, one bot is used for all notifications in your project.
Important! All actions described below must be performed together with creating a private group on the platform.
Creating a bot
Open a chat with @BotFather (you can use this link).
If you have not previously interacted with this bot, enter \/start and then the \/newbot command.
The bot will ask you to come up with a name for your bot. This is the name that will be displayed in the contacts list (in our example - kwiga example)
Then you need to come up with a username for the bot - this is a unique name by which the bot can be found in Telegram, and it must end with bot (in our example, KwigaExample_bot).
After that, the bot will be created and you will receive information on how to add a description, an avatar, a link to the bot itself, and most importantly, the token, which is required so that this bot can send notifications.

Getting the token of a previously created bot
Open a chat with @BotFather (you can use this link). Enter the \/token command and select from the list which bot's token should be shown:

After selecting the bot (using @alanaschool3_bot as an example), you will receive the token.

Proceed to creating the private group. At the Notification bot settings step, you need to fill in 2 fields: name and token.
Creating a group or channel in Telegram
Telegram offers two types of communication with subscribers: a channel and a group. In a group, all participants can send messages, while in a channel only the channel administrator can post messages.
Depending on your goals, create a group or a channel. The examples below describe group settings, as it is the more popular tool.
Please note! You can connect a previously created group with existing participants to Kwiga, but it will work incorrectly due to Telegram limitations. The bot will not be able to remove or add participants who joined the group before setting it up on Kwiga.
Adding the bot to the group
Open the created group and select Manage group.

Select Add Administrator, enter the name of your bot, and add it as an administrator. Make sure the bot permissions include Adding and removing users.

After that, type the \/chatid command in the group, and the bot will show the number that needs to be specified in Kwiga. Please note, the command must be entered not in the chat with the bot, but specifically in the group/channel for which you are setting up access.
If you do not see the bot's response to the entered command, make sure you are creating the group on the platform, i.e. you have completed the first step and specified the bot API when creating the group. If you have only created the bot but have not specified it on the platform, the command will not produce the required result.

Other settings
You can configure other settings in the group however is convenient for you; they do not affect the group's functionality.
Public group or Hidden group - after adding the bot to the group, it will monitor all new users in the group. If a user does not have access to the group, the bot will remove them as soon as they join, so you can make the group public or hidden - it will contain only those participants who have received or paid for access.
Whether chat history is visible to newly joined users and whether users can save content - you can configure all of this additionally or change it at any time.
What group participants can do and how often they can send messages.

Didn't find the answer? Contact the support service via online chat or Telegram