Telegram Pro
Telegram integration is included in our Pro Add-on and becomes available once Pro is installed.
With Telegram set up, your users can approve a login from the Telegram app. When 2FA verification is required, your Telegram bot sends the user a message with a button, and the login continues as soon as they click it.
This page covers the basics to get you started, it is not a full reference yet.
Create a Bot
Messages are sent by a Telegram bot that belongs to you. To register one, start a chat with @BotFather from your Telegram account and follow its instructions. It will give you the bot name and an API token, which you need for the next step.
Settings
Visit the WP Dashboard > Settings > Login With Ajax > Integrations tab, scroll down to the Telegram Integration section and check Enable Telegram.
| Setting | Description |
|---|---|
Bot Name | The name of your bot, including the @. |
Bot API Token | The API token @BotFather gave you when you created the bot. |
Webhook Secret Token | A random string of your own. It is used to confirm that the webhooks your site receives are really from Telegram. |
Save your settings to set up the webhook with Telegram. You will see a confirmation once it is set up correctly, or the error Telegram returned if it could not be created.
For your safety, the token fields are not displayed when your dashboard is loaded over an insecure connection. Use HTTPS when editing these settings.
Testing
Enter a Telegram User ID in the Test Messages field and click Send Test Message to check your credentials before saving. To find your User ID, start a chat with @userinfobot on Telegram and it will reply with it.
Once your settings are saved you can also reply to the test message. If the bot answers, your webhook is working.
Using Telegram for 2FA
Enable Telegram in your 2FA methods. Each user then saves their Telegram username in their own 2FA settings, adds your bot on Telegram and sends it the /start command to link the two accounts. A user can unlink their Telegram account again by sending /disconnect to the bot.
Disabling Telegram may disable other security features that rely on it as a second layer of verification, such as 2FA. Please revise your other security settings when disabling it.