Skip to content

Instantly share code, notes, and snippets.

@victorcolina22
Last active February 14, 2025 03:16
Show Gist options
  • Select an option

  • Save victorcolina22/c094c3e7cf4346d59721ba353efd698a to your computer and use it in GitHub Desktop.

Select an option

Save victorcolina22/c094c3e7cf4346d59721ba353efd698a to your computer and use it in GitHub Desktop.

Send a message to Telegram

  1. Create a public channel in Telegram

  2. Create a bot chatting with "BotFather"

  3. Take the token provided after bot creation

  4. Make a fetch to Telegram API

await fetch('https://api.telegram.org/bot${BOT_TOKEN}/sendMessage?chat_id=${CHANNEL}&text=${MESSAGE}')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment