Vercel Telegram 消息推送机器人
在项目设置中添加telegram_bot_token环境变量,如图下图所示(将xxxx换成你的telegram bot token)

curl -X GET "http://<your_url>/api/notify?u=123&m=HelloWorld"
curl -X POST "http://<your_url>/api/notify?u=123" \
-H "Content-Type: application/json" \
-d '{"title": "标题", "body": "内容"}'
或在 JSON body 中指定用户 ID:
curl -X POST "http://<your_url>/api/notify" \
-H "Content-Type: application/json" \
-d '{"title": "标题", "body": "内容", "u": 123}'
| url 路径 | 参数(类型, 说明) | 说明 |
|---|---|---|
| api/notify | m(消息内容),u(telegram用户id) | 发送文字消息 |
| api/notify | JSON body: title, body, u | POST请求发送消息 |