Author: Mark Munene (https://github.com/marknesh)
Description: Sends a message to your telegram bot once a new user is created.
Details: Use this extension to send instant notifications to a telegram bot which notifies you when a new user is created.
This extension uses other Firebase or Google Cloud Platform services which may have associated charges:
- Cloud Functions
To install an extension, your project must be on the Blaze (pay as you go) plan
Configuration Parameters:
-
TELEGRAM_BOT_TOKEN: The unique authentication token assigned to your Telegram bot by the BotFather.
-
TELEGRAM_CHAT_ID: The telegram chat ID.
-
TELEGRAM_MESSAGE: The message to send to the telegram bot.This field is optional.
- Open Telegram and search for @BotFather.
- Start a chat and send
/newbot. - Follow the prompts to choose a display name and a username (the username must end in
bot). - BotFather will reply with your bot token. It looks like:
123456789:ABCdefGHIjklMNOpqrsTUVwxyz
Save this token — you’ll use it as TELEGRAM_BOT_TOKEN when configuring the extension.
- Open a chat with your new bot and send it any message (for example:
hello). - In a browser, open:
https://api.telegram.org/bot<YOUR_BOT_TOKEN>/getUpdatesReplace<YOUR_BOT_TOKEN>with the token from BotFather.
In the JSON response, find "chat":{"id": ... }. That number is your chat ID.
Use that id value as TELEGRAM_CHAT_ID when configuring the extension.
If result is empty ([]), send another message to the bot and refresh the URL.
Cloud Functions:
- sendMessage: Sends a message to the telegram bot.