Product guides
Connect a Telegram account
You can connect your own Telegram account to Wbiztool, next to your WhatsApp numbers. It sends through the same API and the same pages as a WhatsApp number, and people see your messages as normal Telegram messages from you.
- One API for both. Send message, Send to multiple numbers, Schedule message, Send to group, Cancel message and the message status webhooks work the same way. Pass the Telegram account's ID as
whatsapp_client. - The same pages. Quick send, campaigns and reminders can send from it.
- More ways to reach people. Send to a phone number, an @username, a t.me link or a group.
Who can do it: Owners and Editors connect and manage Telegram accounts.
Before you start#
- Telegram on your phone, logged in with the account you want to send from.
- A confirmed email address.
- A plan that's paid up and has a free number slot. A Telegram account takes one of your plan's number slots, like a WhatsApp number. See Number limits.
- Messages left on your plan. Each message from a Telegram account uses one message credit, as on WhatsApp.
Connect your account#
On the Numbers page, click Add Telegram account. You also find it under the Add a WhatsApp number window: Connecting a Telegram account? Add Telegram account.
The Add a Telegram account window offers two ways to log in: Scan QR code or Login code. Both give the same result.
With a QR code#
Use this when your phone is next to the computer.
Open Add Telegram account
On the Numbers page, click Add Telegram account. The window opens with Scan QR code selected.
Show the QR code
Click Show QR code. The Scan with Telegram window shows the code.
Open Add Device on your phone
Open Telegram on your phone and go to Settings → Devices → Add Device.
Scan the code
Point your phone at the QR code. The code changes every 30 seconds: scan the newest one. When the login works, the window shows Telegram account connected and "… is connected. Messages you send from it go out through Telegram."
With a login code#
Use this when you can't scan a QR code, for example when the phone is your only device.
Choose Login code
In the Add a Telegram account window, click the Login code tab.
Enter your number
Check your country under Country code. Under Telegram phone number, type the number your Telegram account uses, without the country code, for example
9876543210. Click Send login code.Type the code
Telegram sends a login code to your Telegram app (or by SMS). In the Enter the login code window, type it under Login code and click Log in. The window then shows Telegram account connected.
Two-step verification#
If your account has two-step verification, the window asks for its Telegram password after the QR code or the login code: Enter your Telegram password. Type your Telegram (cloud) password under Telegram password and click Log in. Wbiztool uses it once to log in and never stores it.
After connecting#
- The account gets a card on the Numbers page with a Telegram badge and its ID, for example ID 702. Click the ID to copy it: use it as
whatsapp_clientin the API, as for a number. - Click Send test message to check that it sends. Under Send to, type an @username or a phone number with its country code, for example
@nameor+91 98765 43210. - Rename and Remove work as for a WhatsApp number. See Manage a number.
Send from your Telegram account#
Pick the Telegram account like any number: under From in Quick send, as the sending number of a campaign or a reminder, or with its ID as whatsapp_client in the API. Its messages show in Reports, and the webhook of Send message reports SENT or FAILED as for WhatsApp.
curl -X POST https://wbiztool.com/api/v1/send_msg/ \
-H "Content-Type: application/json" \
-d '{
"client_id": 12345,
"api_key": "YOUR_API_KEY",
"whatsapp_client": 702,
"phone": "@emma_thompson",
"msg": "Hi Emma, your order #4821 has shipped and will arrive on Thursday."
}'
Replace 12345, YOUR_API_KEY and 702 with your own values: 702 is the Telegram account's ID from its card.
Who you can send to#
From a Telegram account, phone in the API (and the numbers in Quick send, a campaign's numbers and a reminder's Send to) takes any of these:
| You write | Example | Good to know |
|---|---|---|
| A phone number with its country code | +91 98765 43210 | The person must be on Telegram. The first time, the number is added to your account's Telegram contacts. Telegram refuses people who hide their number from strangers: the message fails with "Not on Telegram, or their privacy settings hide this number". |
| An @username | @emma_thompson | The person's Telegram username. |
| A t.me link | t.me/emma_thompson | The same as the @username. https://t.me/emma_thompson works too. |
tg:<id> | tg:5012345678 | How the inbox and its webhooks name a person who shows no number and no username. Use it to reply to them. |
Usernames, t.me links and tg:<id> only work from a Telegram account. From a WhatsApp number, Send message and Schedule message answer "Telegram usernames can only be sent to from a Telegram account: pass its id as whatsapp_client", and Send to multiple numbers skips them.
Which account the API picks#
When you leave out whatsapp_client, Send message uses the only connected number, WhatsApp first:
- One connected WhatsApp number is used, even if a Telegram account is also connected. Adding a Telegram account doesn't move your existing integrations to it.
- A Telegram account is used only when no WhatsApp number is connected.
- An @username uses the only connected Telegram account.
To send from the Telegram account in any other case, pass its ID as whatsapp_client.
Groups#
From a Telegram account, group_name (and Groups in Quick send) takes:
- a public group's @username or t.me link, for example
@lumen_clubort.me/lumen_club, or - the exact name of a group or channel the account is in, for example
Lumen VIP Club. Upper and lower case don't matter.
The account must already be a member of the group and allowed to post there. It never joins a group by itself.
- If no group matches, the message fails with "Group not found".
- If the account can't post there, it fails with "This Telegram account can't post in that group: join it in Telegram first (or the group lets only admins post)".
Telegram's limits#
Telegram limits how many people who haven't contacted an account it may message. New accounts are limited the most.
- When Telegram says to slow down, the account pauses and its messages wait. They go out after the pause.
- When Telegram limits messages to strangers, that message fails with "Telegram limited this account: it can't message people who haven't contacted it for now. Sending resumes in an hour", and the account rests for an hour.
The inbox (Unibox)#
A Telegram account can be added to the Unibox inbox like a number: on Inbox numbers, click Add number to inbox and choose it. It uses one of your Unibox add-on's inbox numbers, like a WhatsApp number.
- Its private chats show in the inbox: messages it receives, and messages sent from the phone or by Wbiztool. Chats from Telegram show a Telegram mark.
- Files up to 16 MB are copied into the inbox.
- Replies work even to people who hide their number.
- Groups, channels, Saved Messages and Telegram's own service chat (the one with login codes) are never shown.
An inbox account's webhook posts its messages like a number's. The payload has platform set to telegram, and contact.phone and message.from are the person's number, @username or tg:<id>: send your reply to that value as phone. See Payload.
Disconnect or reconnect#
- Disconnect on the card stops the account from sending. It also logs Wbiztool out of the account's device list in Telegram.
- If Telegram ends the session, for example when you log Wbiztool out under Settings → Devices, or the account is logged out everywhere, the card shows Not connected. Owners and Editors get a disconnect alert worded for Telegram, as for a WhatsApp number. See WhatsApp disconnect alerts.
- While the account isn't connected, its messages wait under Waiting to send.
- To connect it again, click Reconnect on its card and log in again, with a QR code or a login code.
Not available yet#
- Exporting the members of Telegram groups. Group members export works for WhatsApp groups only.
- Telegram groups in the Unibox inbox. Only private chats show there.
Troubleshooting#
| Problem | What to do |
|---|---|
| No Add Telegram account button | You're an Analyst in this workspace. Ask an Owner to do it or to make you an Editor. |
| Add Telegram account is greyed out | Point at it to see why: your email isn't confirmed, all your plan's number slots are used, or the plan isn't paid up. The same rules apply as for numbers, see Number limits. |
| The QR code doesn't work | It changes every 30 seconds: scan the newest one, in Telegram under Settings → Devices → Add Device. If the window says "The login took too long. Start again.", click Start again. |
| "That code isn't right. Check the latest code Telegram sent and try again." | Type the newest login code from your Telegram app (or the SMS). |
| "The code expired. Start again to get a new one." | Click Start again and type the new code. |
| "That password isn't right. Try again." | Type the account's Telegram password from two-step verification, not the login code. |
| "This number has no Telegram account." | Check the country and the number, or log in with the QR code. |
| "Telegram asks to wait before trying again. Try again later." | Wait a while, then log in again. |
| Failed with "Not on Telegram, or their privacy settings hide this number" | The person isn't on Telegram, or hides their number from people they don't know. Send to their @username instead, or ask them to message your account first and reply from the inbox. |
| Failed with "Group not found" | Check the group's exact name, or use its @username or t.me link. The account must be a member of the group. |
| Failed with "This Telegram account can't post in that group: join it in Telegram first (or the group lets only admins post)" | Join the group in Telegram with this account first. If only admins can post, ask an admin of the group. |
| Failed with "Telegram limited this account: …" | See Telegram's limits. Sending resumes after an hour. |
| The API answers "Telegram usernames can only be sent to from a Telegram account: pass its id as whatsapp_client" | Pass the Telegram account's ID as whatsapp_client. See Which account the API picks. |
| The card shows Not connected | Telegram ended the session. Click Reconnect and log in again. |
