> For the complete documentation index, see [llms.txt](https://docs.basedbot.app/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.basedbot.app/web-app/webapp/login.md).

# Login & Authentication

<figure><img src="https://3562303282-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FE5bUac2iI3Ns1M4sRzbQ%2Fuploads%2Fgit-blob-e45c0bdd280aee0562c8e99080d3d4eaac6f0688%2Fwebapp-login.png?alt=media" alt="" width="375"><figcaption><p>Login — connect with BasedBot via Telegram OTP</p></figcaption></figure>

## Two ways to sign in

**Connect Wallet**: connect MetaMask, Rabby, Phantom or another wallet and sign a message, no password. The first time a wallet connects it creates a **new** web app account for that wallet.

**Connect with Telegram**: the web app opens a login link to the BasedBot bot in Telegram; tap it there and you are signed in instantly, or copy the one-time code the bot shows and paste it on the web app. Opening the web app from inside Telegram as a Mini App can sign you in automatically the same way. Either path signs you into the account tied to that Telegram id, creating one if it doesn't exist yet.

## Web App account and Telegram bot account are separate

Connecting a wallet and connecting with Telegram do not create or use the same account, and there is no feature that merges them. A web app account made by connecting a wallet stays a different account from a Telegram bot account, even for the same person.

The only continuity between them is a wallet's private key: export it from one account and import it into the other to trade the same wallet on both. Settings, referral code and cashback tier are per account and do not carry over.

## Link a device

To use the same web app account on a new browser or phone: on a device where you're already signed in, open the profile menu > **Link a device** to get a QR code (or a one-time text code). Scan it with the new device, or on the new device's login page choose the login-code option and paste the code there. This adds the new device to your existing account, it never merges two different accounts.

## Session Persistence

Once logged in, your session persists across browser tabs and page reloads. You do not need to re-authenticate each time you visit the app.

## Security Notes

* No passwords are stored on the web app: wallet signatures and Telegram OTP are the only credentials.
* Always access the web app at the official URL: [basedbot.app](https://basedbot.app).
* Never share your OTP, your Link a device code, or any login code with anyone.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.basedbot.app/web-app/webapp/login.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
