> ## Documentation Index
> Fetch the complete documentation index at: https://docs.homiagent.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Connect Telegram

> Link your Telegram account to HomiAgent with a one-time code, and unlink it any time.

You talk to HomiAgent through Telegram. To let the bot know who you are and which home to control, link your Telegram account with a temporary code from the dashboard.

## Link your account

<Steps>
  <Step title="Get a link code">
    In the [HomiAgent dashboard](https://homiagent.app/app/telegram), open **Telegram** and click **Link account**. Copy the message shown. It looks like `/connect ABC123`.
  </Step>

  <Step title="Message the bot">
    In Telegram, open [@homiagent\_bot](https://t.me/homiagent_bot) and send it the message you copied.
  </Step>

  <Step title="Confirm">
    The bot confirms the link. Refresh the dashboard and your account appears under **Linked accounts**.
  </Step>
</Steps>

<Info>
  Link codes expire after 10 minutes. If the bot says the code is invalid or expired, generate a new one.
</Info>

<Note>
  The bot only works in a **private chat**. Messages in groups are ignored, and a group can't be linked.
</Note>

## Link more than one account

Each person in your household can link their own Telegram account. Repeat the steps above and generate a new code for each person. Every linked account talks to the same HomiAgent account, so they all control the homes connected to it.

## Bot commands

Before you link, the bot only offers `/connect`. Once linked, the **/** menu in the chat shows:

| Command | What it does |
| - | - |
| `/buy` | Buy credits. |
| `/currency` | Choose the currency you pay in. |
| `/clearsession` | Start a fresh conversation, clearing the context. |
| `/disconnect` | Unlink this chat from your account (asks for confirmation). |
| `/pinstatus` | Pin the active home and room message again. |

## Unlink an account

There are two ways:

* **From the bot:** send `/disconnect` and answer **Yes** to the confirmation.
* **From the dashboard:** under **Telegram → Linked accounts**, click **Unlink** next to the account.

After unlinking, the bot stops answering that chat and only offers `/connect` again. You can link it again whenever you want.

## Switching HomiAgent accounts

If you link a chat that is already linked to a **different** HomiAgent account, the old link is removed and the chat moves to the account that generated the new code.

<Card title="Next: add credits" icon="coins" href="/quick-start#5-add-credits">
  The assistant only answers when your account has credits.
</Card>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.