Creating a Telegram API

“Social Network Integrations” Documentation by “WPWeb”


To create telegram API, download Telegram desktop and do login to your account. You can download Telegram desktop from here.

Now, search for @botfather and click the verified one. Now, click on start as shown in the screenshot.

Botfather

Now, select “/newbot” as shown in the screenshot below.

1

Now, choose name and username of the bot as shown in the screenshot. After entering username, it will ask for bot name. Choose name of the bot that must ends with “bot” i.e. wpwebbot OR wpweb_bot.

Botname

Once you enter bot name it will generate bot token and bot URL as shown in the screenshot.

2

Now, open a bot URL as shown in the screenshots below.

3

Once you click on a bot URL it will open another chat window and click on start.

4

After that enter the bot name and bot token within the plugin settings and save the settings. See Image Below:

6

 

Note : To configure groups and channel, you must be an admin for the groups and channels on which you want to do auto posting.

Assuming you already having a group. If not please refer this documentation to create Telegram group. go to group settings and add bot as an admin. First of all go to add members setting.

Add members

Search the bot name that you have created and click on add.

Add members


Now, go to manage group settings.

7


Now, click on members.

Members


Search the bot name and propote as an admin.

Add members


After that permissions popup occurs. Select the permissions as shown in the screenshot below.

Add members

Assuming you already having a Channel. If not please refer this documentation to create Telegram channel.Now, go to Channel settings and add bot as an admin. First of all, go to add members settings as shown in the screenshot.

Channel 1

After that search the bot that you have created and click on add.

Channel 2

Bots can only be added as an admin so, click on make admin.

Channel 3

Channel permissions for bot will be as shown in the screenshot.

Channel 4

Now, go to plugin settings and click on “Refresh data & save” button. Your Telegram account, group and channel will be available for selection within the plugin settings.

12

Now, if you want to map another Telegram user account, that user needs to search bot name from their account and need to hit start button.

4

Now, go to plugin settings and click on “Refresh data & save” button. Your Telegram account, group and channel will be available for that selection within the plugin settings.

12

 

Note: As the API is pulling recent activate chats only, you need to send message to group or channel (that you want to configure) before clicking the refresh & save button. In a same way Telegram user needs to send /start to the bot who wants to receive updates.