pusher is an api server based on fiber to handle telegram bot /sendMessage api
pusher is for personal usage, thus it can only serve one user
Auto build docker image by GitHub Actions
Quick Start
docker run -d --name pusher -p 3333:3333 \
-e TG_TOKEN=<your_tg_bot_token> \
-e CHAT_ID=<your_chat_id> \
bipy/pusher:latestFully Featured
docker run -d --name pusher -p 3333:3333 \
-e TG_TOKEN=<your_tg_bot_token> \
-e CHAT_ID=<your_chat_id> \
-e SERVER_HOST=0.0.0.0 \
-e SERVER_PORT=3333 \
-e SECURE_KEY=pAssw0rd \
bipy/pusher:latestDo Use Behind a Reverse Proxy with HTTPS
| Name | Value | Description |
|---|---|---|
| TG_TOKEN | string | <your_tg_bot_token> |
| CHAT_ID | int | <your_chat_id> |
| SERVER_HOST | string | default "0.0.0.0" |
| SERVER_PORT | int | default 3333 |
| SECURE_KEY | string | default "" (disabled) |
You can use pusher by GET or POST method
GET
| Param | Value | Description |
|---|---|---|
| text | string | your message |
| msg | string | same as text (valid only if text is empty) |
| preview | default is empty (disable preview) | |
| markdown | default is empty (disable markdown) |
POST
{
"text": "your message",
"preview": false,
"markdown": false
}Also support for louislam/uptime-kuma Webhook Notification
(Optional) Use SECURE_KEY
| HTTP Header | Value | Description |
|---|---|---|
| Secure-Key | string | used for verification |
- Set environment
- Add header for each request
Q: Why would I use pusher rather than the official api?
-
Telegram official api is blocked in some area:
you can use pusher as louislam/uptime-kuma webhook notification
-
pusher will remember bot token and chat id for you, so you can simply push your message by a GET query:
curl "https://example.com/pusher?text=hello%20world"or even simpler using HTTPie:
http POST https://example.com/pusher text="hello world"
Q: Where is the release?
-
Deploying with docker is recommended, plz refer bipy/pusher - DockerHub or build image by yourself
-
Also, if you want to build and run cli in a shell or as a service:
git clone https://github.com/bipy/pusher.git; cd pusher go build TG_TOKEN=<your_tg_bot_token> CHAT_ID=<your_chat_id> ./pusher
MIT License
Copyright (c) 2021 bipy