Skip to content

alejack9/rest-telegram-messages-sender

Repository files navigation

Telegram Sender Service

Description

Simple REST API to send a message to a specific chat via Telegram Bot

Hint:

You can get your telegram chat id using @userinfobot (https://github.com/nadam/userinfobot).

Run

Environment Variables

Variable Description
BOT_TOKEN Token that identifies the Bot
CHAT_ID Id of user which send the message to
PORT API port number

Via Docker

Create a network named backend (to be shared with other nodes)

docker network create backend

Run

npm run deploy

Or

npm run deploy:only

Note

There are no exposed ports in the docker compose configuration file

Via NPM

Run via NPM

npm install
npm start

Rest API

Reach REST server at http://localhost:8000/ using method GET

Query String

Field Description
message The message to send

Example:

    curl -G --data-urlencode 'message=bots are awesome!' http://localhost:8000

About

Simple REST API to send messages to a specific chat via Telegram Bot

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors