Telegram bot instruction

 

In this article, I will tell you how to post messages from the Contact form or Callback module to the Telegram.

We will create a Telegram bot, it absolutely free and easy and takes us 10-15 minutes.

1. Create a bot

First of all, open Telegram and find a special bot, which will help you to create your own. You can do it by this link https://telegram.me/botfather or just search botfather.

Get API token for the Telegram

Type /start, then use /newbot command to create a new bot and follow instructions. In the end, you will get an API Token, save it to use in step 3.

2a. Create a channel

Open the Main menu (top left icon) and choose “New Сhannel”. Then type channel title and URL. Save URL address, you will need it in step 3. Caution! We are creating a public channel, example with private channel will be described below (paragraph 2b).

Create telegram channel
Now, find created channel in the contact list, open it and click on the channel pic.  You will find a page with channel info. Open “Administrators” list, select “Add administrator” and type your bot name. Approve bot access and now it’s on.

Add channel admin

2b. How to create a private channel

This paragraph would help you to create a private channel. It’s not necessary, but I strongly recommend you to do it.

If you already have made a public channel, you should change the status from public to private. Open channel info and find options icon. Select “Channel type” and change the status.

Set private status
Unfortunately, we can’t use channel URL for the private channels. We must handle with Chat ID and it’s not so easy to get it in Telegram. I have described the two most easy ways below:

–  invite @get_id_bot in your chat and then type /my_id@get_id_bot inside your chat;

Chat id

 

– or login under your account at the web version of Telegram. Find your channel. See to your URL, it should be like https://web.telegram.org/#/im?p=c1257868655_11052224402541910257. Grab “1257868655” from it, add “-100″ as a prefix, and you will get Chat ID. 

Another Chat ID

3. Configure the module

Open module options in the admin panel. Choose “Bots” tab and insert API Token and chat name(chat! not a bot) or Chat ID in the fields.

contactus_engNow all messages from the Callback or Contact modules will be sent into your Telegram.

 

Leave a Reply