Plugin Strapi for sending messages to a Telegram bot.
The plugin allows sending text messages to site administrators. This will enable quicker processing of customer inquiries or orders.
Currently, this is not implemented.
(Use yarn to install this plugin within your Strapi project (recommended). Install yarn with these docs.)
yarn add telegram-bot-strapi
After successful installation you've to re-build your Strapi instance. To archive that simply use:
yarn build
yarn develop
The telegram-bot plugin should appear in the Plugins section of Strapi sidebar after you run app again.
As a next step you must configure your the plugin by the way you want to. See Configuration section.
All done. Enjoy 🎉
-
Register a Telegram bot using @BotFather
-
Add the received token to the .env file.
TELEGRAM_TOKEN=""
-
A plugin will appear in the Strapi admin panel.
-
Congratulations, everything is ready for use.
-
Add the created bot to the contacts list.
-
In the bot's window, click the
Update list chats
button. -
To send messages to all selected users, make a
POST
request.http://[addres sever]/telegram-bot-strapi/send-message { "message": "My first message" }
-
All activated users will receive the message.
-
In response, we will receive a message:
{ "result": "Message send" }