Create a Telegram App
To connect the Telegram App Chat Gateway to Webitel, you have to do the following:
1. Have a Telegram account registered to a phone number.
How to register Telegram App can be found here.
2. Log in to the site https://my.telegram.org.
3. Go to API development tools. Fill out the form and click the Create application button (Fig.1).
The configuration page opens. The following parameters are taken from here (Fig. 2):
API id
API hash
5. Go to Webitel – Admin, Chat Gateways page, and create a new Chat Gateway by selecting Telegram App (Fig.3).
6. Fill in the fields (Fig. 4) using the previously obtained data (see point 4).
7. Click the Save button. The Sign in to Telegram button appears (Fig. 5).
8. Click the Sign in to Telegram button and log in to Telegram (the same phone number as point 2).
9. After a successful login, the Logout button and the name of the Telegram account are displayed.
The Templates tab is used for additional settings of system notifications in the chat.
10. Go to the Chat Gateways page and enable the newly created text gateway using the State switch (Fig. 8).
The Chat Gateway is created, connected, and enabled.
11. Create a Flow on the Flow page with the Broadcast message component (Fig. 9) through which outgoing messages will go.
Peer - ${destination} – it is a variable of the phone number of Members in a Queue.
Chat Gateway profile - it is Chat Gateway created earlier (points 5-10). Click the Add button after selecting the Chat Gateway.
Click the Save button.
12. Go to the Queues page, click the Add button, and create an Outbound task queue (Fig.10).
The General tab opens (Fig.11) after clicking the Create button.
13. Fill in the required fields. In the Flow schema field, select the Flow created earlier (point 11).
Click the Save button. Go to the Queues page.
14. Open this queue's Members page and create Members who will receive messages.