InstantPing

InstantPing / Guides

Claude Code notifications to Telegram with a bot

Updated 2026-12-04

A Telegram bot is a free, reliable way to get Claude Code notifications on your phone. You create a bot, find your chat id, and a Stop hook sends you a message with curl.

Step 1: create the bot

In Telegram, chat with @BotFather and send /newbot. Follow the prompts and copy the bot token it gives you.

Step 2: find your chat id

Send any message to your new bot, then open https://api.telegram.org/botYOUR_TOKEN/getUpdates in a browser. In the JSON, find "chat":{"id":...}. That number is your chat id.

Step 3: add the hooks

In ~/.claude/settings.json:

{
  "hooks": {
    "Stop": [
      { "hooks": [ { "type": "command", "command": "curl -s https://api.telegram.org/botYOUR_TOKEN/sendMessage -d chat_id=YOUR_CHAT_ID -d text=Claude%20Code%20is%20done" } ] }
    ]
  }
}

Add the same block under "Notification" with the text Claude%20Code%20is%20waiting. Restart the session and send a short prompt to test. The commands assume a POSIX shell (macOS, Linux, WSL, Git Bash).

The catches

If you want all of that handled for you, see the phone options compared.

Frequently asked questions

How do I get Claude Code notifications in Telegram?

Create a bot with @BotFather, find your chat id through getUpdates, then add a Stop hook that calls the sendMessage API with curl.

Is a Telegram bot free?

Yes. Creating a bot and sending messages through the Bot API costs nothing.