Out-of-Band with telegram bot api using cloudflare workers.
const TOKEN = 'ENV_BOT_TOKEN' // Your bot token.
const SECRET = 'ENV_BOT_SECRET' // Everything you wish.
const OWNER = 123456789 // Owner telegram id.
- Upload
worker.js
into cloudflare workers. - Modify the variables.
- Deploy.
- Register Webhook
XXX.XXXX.workers.dev/registerWebhook
// Response - Ok
- unRegister Webhook
XXX.XXXX.workers.dev/unRegisterWebhook
// Response - Ok
- Send Test Request
XXX.XXXX.workers.dev/test
// Response - {"status":200}
- Send Message
XXX.XXXX.workers.dev/?send=hello+world
// Response - {"status":200}
- Send Bulk URL
XXX.XXXX.workers.dev/p/data...
// Response - {"status":200}
- For better performance send data with
URL-encode
orBase64
format.
Text: test message
Encoded:
- test%20message // URL-encode
- dGVzdCBtZXNzYWdl // Base64
...
- You can use telegram markdown.
*bold*
_italic_
[text](url)
`mono`
```code block```