Integrations / Telegram

Telegram logo

Team chat · Native channel (bot token)

Telegram + Sendjade

Connect a Telegram bot as a native Sendjade channel: send messages and files, and receive replies.

Beta · built and tested, not yet verified on live accounts

What you can automate

  • Send invoices, receipts and alerts to people who messaged your bot
  • Post notifications into a Telegram group with real @mentions
  • Receive replies in the console Inbox, by webhook or by polling
  • Alert yourself in Telegram when a number disconnects

Before you start

  • A Sendjade account with a connected instance (status Authorized). See Getting started.
  • Your **idInstance** (shown on the instance page in the console) and **apiTokenInstance** (shown once when you created the instance; press Generate new token if you lost it). Use a spare number while testing.
  • A Telegram bot token from @BotFather (about 2 minutes). Telegram uses its official Bot API, so there is no QR code and no unofficial-connection risk.

Set it up

  1. Create the bot

    In Telegram open @BotFather, send /newbot, choose a name and a username ending in bot, and copy the token it gives you (it looks like 123456789:AA...).

  2. Create a Telegram instance

    In the console choose Create instance, Telegram, press Connect and paste the token. The instance shows your bot's @username and the status Authorized. Or use the API with a workspace API key:

    curl
    BASE=https://api.sendjade.com/api/v1
    curl -s -X POST $BASE/instances -H "Authorization: Bearer $SENDJADE_API_KEY" \n  -H "Content-Type: application/json" -d '{"name":"Orders bot","channel":"TELEGRAM"}'
    
    curl -s -X POST $BASE/instances/$INSTANCE_UUID/connect -H "Authorization: Bearer $SENDJADE_API_KEY" \n  -H "Content-Type: application/json" -d '{"botToken":"123456789:AA..."}'
  3. Let the person start the bot

    A Telegram bot can only write to people who messaged it first (or who added it to a group). Open your bot in Telegram and send it any message. The numeric chat id appears with that incoming message in the Inbox, in the webhook payload and in the polling queue.

  4. Send a message

    Use the chat id as chatId. The Green-style URL works for Telegram instances too, so existing tools need no change beyond the id:

    curl
    curl -s -X POST https://api.sendjade.com/waInstanceYOUR_ID_INSTANCE/sendMessage/YOUR_API_TOKEN_INSTANCE \n  -H "Content-Type: application/json" \n  -d '{"chatId":"123456789","message":"Hello from Sendjade"}'
  5. Receive replies

    Register your endpoint under Webhooks (Admin role) or with POST /api/v1/webhooks. Choose the native format (default) and the events you need, such as message.received, message.delivered or message.failed. The signing secret is shown once. Incoming Telegram messages arrive like any other, with the channel recorded on each one.

  6. What is different from WhatsApp

    Telegram never reports delivered or read to bots, so messages stay at Sent. Bots cannot create groups or add people, and cannot message a phone number cold. Mentions work with an @username or a numeric user id.

Test it

Message your bot from Telegram, note the chat id shown on the incoming message in the Inbox, then send it a message through the API and watch it appear in Telegram.

Troubleshooting

Connect says invalid_bot_token

Telegram rejected the token. Copy it again from @BotFather (or run /token to get a fresh one). Nothing was stored.

Sending fails for a chat id

The bot cannot write first. Message the bot yourself, then retry with the numeric chat id from that incoming message.

Messages stay at Sent

That is expected on Telegram: bots get no delivered or read receipts. Sent means Telegram accepted the message.

I get 401 unauthorized

The idInstance or token in the URL is wrong. Copy both again from the console. Generating a new token makes the old one stop working immediately.

I get 409 instance_not_connected

The instance is not Authorized yet. Open it in the console, press Connect and scan the QR code.

I get 422 recipient_opted_out

That person replied STOP (or was added to the opt-out list). Sendjade refuses to message them. Remove the number from Opt-outs only if they asked to hear from you again.

I get 429 daily_limit_reached or rate_limited

The number reached its 24-hour sending cap (default 500) or you are calling too fast. The cap protects your number from restriction. Slow down, and raise the cap only if your volume is genuine.

Ask AI to help me integrate Telegram

Copy this prompt into ChatGPT, Claude or any assistant. It already knows Sendjade’s API, so the answer matches our endpoints.

The prompt is plain text that you copy yourself. Never paste real keys into an assistant; use placeholders.