---
title: "Rork on Telegram: add Telegram messages to your app"
description: "How to add Telegram to an app built with Rork: read and answer Telegram chats through one API, with a prompt to paste, step by step."
url: https://www.spacesos.com/blog/rork-on-telegram
author: "Bhavya Barot"
published: "2026-12-04"
modified: "2026-12-04"
keywords: "Rork on Telegram,Rork Telegram integration,Telegram API for Rork,connect Telegram to Rork,Rork Telegram messages"
---

Running your business4 Dec 20268 min read

# Rork on Telegram: add Telegram to your app

By [Bhavya Barot](https://www.linkedin.com/in/bhavyabarot/) · Updated 4 Dec 2026

You are building with Rork, and the app needs Telegram: to read the chats that come in, answer them, and maybe let an AI agent draft the replies. Rork can build almost any screen, but it cannot reach Telegram on its own.

This guide shows how to connect the two with Spaces, what the app can do once it is connected, the prompt to paste, how to test it, and the problems people run into.

Key takeaways

- Rork cannot reach Telegram on its own; Spaces gives the app one API for it.
- You connect the Telegram account you already use, with no developer app or review.
- The key stays in Environment Variables, and Spaces is called only from a Rork Backend function.
- Test with an account you control before real customers write.

**Rork**

**Telegram**

[Start free](https://app.spacesos.com/signup) [Read the docs](https://www.spacesos.com/docs)

## The short answer

Rork apps cannot talk to Telegram directly. Spaces sits in between: you connect your Telegram account to Spaces once, and your Rork app reads and answers its chats through one REST API, called from a Rork Backend function.

There is no developer app to register and no review to pass on Telegram.

The same API covers Instagram, WhatsApp, LinkedIn, Facebook Messenger and Telegram, so adding a second channel later is the same calls with a different account.

## Why Telegram is hard to add on your own

Most people first try the Telegram Bot API. It is free and quick, but a bot is a separate account that people have to find and start; it cannot read or answer the chats and groups on your own Telegram account.

What the Telegram Bot API asks for, from Telegram’s own documentation, read on 3 Dec 2026:

- Telegram bots are separate accounts created through @BotFather, which issues the bot’s token.
- A bot cannot start a conversation: a person has to message it or add it to a group first.
- In groups with privacy mode on, a bot only receives commands addressed to it and replies to its own messages.
- Telegram describes the bot platform as free, with limits of about one message a second per chat and 20 a minute in a group.

Spaces connects the account you already use instead, and keeps each account inside the network’s limits. The full comparison, with sources: /api-alternatives/telegram-bot-api

Ready to try it?

Start free and let your own AI agent do the replying, or talk to a person on our team first.

[Start free with AI](https://app.spacesos.com/signup) [Talk to a person](https://www.spacesos.com/support)

## How it works with Rork

Rork builds native iOS and Android apps (Expo). You describe what you want and it writes the code.

For Telegram, you paste one prompt: it reads the Spaces guide for agents, and builds the inbox calling Spaces from a Rork Backend function, with the key in Environment Variables.

Spaces does the Telegram side: it holds the connection, paces every send, screens messages written by other people before an AI agent reads them, and tells your app when something new arrives through a signed webhook.

## What your Rork app can do on Telegram

### Chats and groups

Read and answer your Telegram chats and the groups you are in, as you, not as a bot.

### Media

Send and receive photos, files and voice notes.

### New message events

A webhook calls your app when a message arrives.

### One inbox with the others

Telegram chats sit next to WhatsApp, Instagram and LinkedIn in the same API.

## Step by step

1. Create a free Spaces account. The Free plan has 1 connected account and 20 actions a day with no card, which is enough to build and test.
2. Connect Telegram. You link your Telegram account with a QR code in the Telegram app, or sign in with a code sent to your phone.
3. Create an API key in Settings, under Developers. Copy it once: Spaces shows it only when you create it.
4. Save the key in Environment Variables, under the name SPACES_API_KEY. Do not paste it into a page, a prompt or anything that runs in the browser.
5. Paste the prompt below into Rork. It asks for a list of your Telegram accounts, the chats of one account, the messages of a chat and a reply box, all called from a Rork Backend function.
6. Ask a friend to send a message to your Telegram account, open it in your app, and answer it. The reply arrives in Telegram like any other message from you.

## The prompt to paste into Rork

Paste it as it is. It stays in English so it matches the Spaces docs word for word, and it tells Rork where the key lives and what to build.

```
Add Spaces to this app so it can read and answer my Telegram messages.

First read https://www.spacesos.com/llms.txt. My Spaces API key is in a secret called SPACES_API_KEY. Call https://api.spacesos.com/v1 only from a Rork Backend function, with the header "Authorization: Bearer <key>". Never send the key to the browser.

Build:
1. My connected Telegram accounts: GET /messaging/accounts?channel=telegram.
2. The chats of one account: GET /messaging/accounts/{account_id}/chats, newest first.
3. The messages of one chat: GET /messaging/accounts/{account_id}/chats/{chat_id}/messages.
4. A reply box: POST /messaging/accounts/{account_id}/chats/{chat_id}/messages with {"text": "..."} and an Idempotency-Key header, a new one for each message.

Telegram links a person’s own account, so the app answers as that person, not as a bot.

Show Spaces' error messages as they are. On 429, wait retry_after_seconds before trying again. Do not send the same message to many people.
```

Have the app call your Rork Backend function, and only the function call Spaces.

## What it looks like

A short example of a Rork app answering on Telegram, with made-up names:

When does the next cohort start?

12 January. The early price ends Friday, here is the link.

Perfect, signing up now.

## Apps people build with Rork and Telegram

### A community helper

Answers the questions that come up again and again in your groups, and flags the rest.

### A founder inbox

Sorts a busy Telegram inbox and drafts answers for the messages that need you.

### Launch support

Handles the rush of questions during a launch, across time zones.

## Test it before real customers write

1. Connect a Telegram account you control, not a customer’s, and keep the app on the Free plan while you build.
2. Have a friend write to it, and check that the chat shows up with the right name and the newest message first.
3. Answer from the app and check the reply on the friend’s phone, then answer again to see that the history stays in order.
4. Send a photo or a voice note, and make sure the app shows something sensible instead of an empty bubble.
5. Turn off the network for a moment or use a wrong key, and check that the app shows Spaces’ error message instead of failing silently.
6. Only then let an AI agent draft replies, and keep a person approving them for the first days.

## Limits on Telegram

Spaces paces every Telegram account, with a gap between sends and a warm-up for new accounts. Spaces links a person’s own Telegram account. If you want a public bot with commands and buttons, Telegram’s Bot API is the right tool. Every limit is at /limits.

## Common problems and how to fix them

- The app shows no chats. Check that the Telegram account is connected in Spaces and that the app asks for accounts with channel=telegram. A new account shows chats once someone writes to it.
- “Unauthorized”. The key is missing or wrong. Check the name of the secret in Rork and that the call adds the header Authorization: Bearer followed by the key.
- A 429 answer. A limit was reached for that account, and nothing was sent. The answer says how many seconds to wait in retry_after_seconds; wait, then try again with the same Idempotency-Key.
- The same message went out twice. Every send needs a new Idempotency-Key, and a retry must reuse the key of the message it repeats. Spaces never sends twice for the same key.
- The account needs to sign in again. Networks sometimes ask for it. Spaces marks the account and sends a link; until then, sends on that account wait. Telegram links a person’s own account, so the app answers as that person, not as a bot.
- The key shows up in the browser or the app bundle. Never put the key in a variable that starts with EXPO_PUBLIC_: those are built into the app that people download.

## When your users bring their own Telegram

Everything above uses your own Telegram account and one key. If you are building a product where each user connects their own Telegram, you need a partner account, which is in early access.

Your app creates a Spaces user for each of its users, gets a key for them, and sends them a connect link that shows your app’s name.

```
Add Spaces to this app so each of my users can connect their own Instagram, WhatsApp, LinkedIn, Messenger or Telegram account and answer their messages inside the app.

First read https://www.spacesos.com/docs/partners. My Spaces partner key is in a secret called SPACES_PARTNER_KEY. Call https://api.spacesos.com/v1 only from a Rork Backend function. Never send a key to the browser.

Build:
1. When a user opens messaging settings: POST /partner/users with {"external_user_id": "<our user id>"} (safe to repeat), then POST /partner/users/{id}/keys to get that user's key, and store it with the user, encrypted.
2. A "Connect Instagram" (or WhatsApp, LinkedIn...) button: POST /partner/users/{id}/connect-links with {"channel": "instagram", "return_url": "<this page>"} and send the user to the link.
3. With that user's key: their accounts (GET /messaging/accounts), chats, messages and a reply box, as in https://www.spacesos.com/llms.txt.

Show Spaces' error messages as they are, and wait retry_after_seconds on 429.
```

Partner pricing and the full flow are at /saas and /docs/partners.

## What it costs

[Free to start](https://www.spacesos.com/pricing)

Rork is billed by its maker, separately from Spaces. Reading messages is always free in Spaces; sends and other actions count toward the day’s allowance.

## Summary

You are building with Rork, and the app needs Telegram: to read the chats that come in, answer them, and maybe let an AI agent draft the replies. Rork can build almost any screen, but it cannot reach Telegram on its own.

## FAQ

### Does Rork support Telegram on its own?

Rork can call any API from a Rork Backend function, but it has no built-in Telegram messaging. Spaces is the API it calls: you connect Telegram to Spaces, and the Rork app reads and answers the chats.

### Do I need the official Telegram Bot API?

No. Spaces connects the Telegram account you already use through a secure link, so you skip the developer app and the review. You link your Telegram account with a QR code in the Telegram app, or sign in with a code sent to your phone.

### Can I keep using Telegram on my phone?

Yes. Messages your app sends appear in Telegram like any message from you, and you can still answer from the Telegram app. Both see the same chats.

### Is the API key safe in a Rork app?

Yes, if it stays in Environment Variables and Spaces is called only from a Rork Backend function. Never put the key in code that runs in the browser or in a mobile app people download.

### Can the app answer on its own, with AI?

Yes. Let Spaces call your app with a webhook when a message arrives, and have an AI step draft the answer. Start with a person approving each reply, and let it send on its own once the drafts are right. Messages from other people are screened before an AI reads them.

### How much does it cost?

[Free to start](https://www.spacesos.com/pricing). The Free plan is enough to build and test. Reading messages is always free.

[Start free](https://app.spacesos.com/signup) [Read the docs](https://www.spacesos.com/docs)

## Questions people ask

[Why does Instinct keep logging me out of Telegram?Instinct on Telegram](https://www.spacesos.com/blocked/telegram/instinct/logs-you-out) [Why does Claude keep logging me out of Telegram?Claude on Telegram](https://www.spacesos.com/blocked/telegram/claude/logs-you-out) [Why aren’t Grok messages sending on Telegram?Grok on Telegram](https://www.spacesos.com/blocked/telegram/grok/not-sending) [Why does Grokbot keep logging me out of Telegram?Grokbot on Telegram](https://www.spacesos.com/blocked/telegram/grokbot/logs-you-out) [Leap on Telegram: add Telegram to your appGuide](https://www.spacesos.com/blog/leap-on-telegram) [Macaly on Telegram: add Telegram to your appGuide](https://www.spacesos.com/blog/macaly-on-telegram)

## Related

## More articles

[Running your business**Let your AI agent send your payment and booking links, and see who opens them** 11 Nov 2026 · 10 min read](https://www.spacesos.com/blog/send-payment-and-booking-links-with-an-ai-agent) [Running your business**Rocket on Telegram: add Telegram to your app** 4 Dec 2026 · 8 min read](https://www.spacesos.com/blog/rocket-on-telegram) [Running your business**Adalo on Telegram: add Telegram to your app** 4 Dec 2026 · 8 min read](https://www.spacesos.com/blog/adalo-on-telegram) [Running your business**Aider on Telegram: add Telegram to your app** 4 Dec 2026 · 8 min read](https://www.spacesos.com/blog/aider-on-telegram) [Running your business**Amp on Telegram: add Telegram to your app** 4 Dec 2026 · 8 min read](https://www.spacesos.com/blog/amp-on-telegram) [Running your business**Google Antigravity on Telegram: add Telegram to your app** 4 Dec 2026 · 9 min read](https://www.spacesos.com/blog/antigravity-on-telegram)

Live in under 60 seconds

## Your customers are messaging right now.

Let your AI agent answer them tonight. Free to start, no card needed.

For you[Start free, live in 60 seconds](https://app.spacesos.com/signup) No card needed. Connect WhatsApp, Instagram, LinkedIn or Messenger.

For your AI agent

`Set up Spaces for me by following https://www.spacesos.com/agents`

Paste it into Grok, Muse, Claude or ChatGPT. Your agent does the rest.
