> For the complete documentation index, see [llms.txt](https://readme.directual.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://readme.directual.com/plugins/using-plugins/user-authentication-plugins-not-web3/tma-telegram-mini-app.md).

# TMA (Telegram Mini App)

## What is Telegram Mini Apps (TMA)

[Telegram Mini Apps](https://core.telegram.org/bots/webapps) is an open platform for businesses to build and deploy web-apps right into Telegram. Like bots, **Mini Apps** support seamless authorization.

## Directual TMA plugin

Directual TMA plugin allows you to deploy your Directual-based web-app to Telegram, send notifications via bot, and use seamless authorization for your users.

### Step 1. Install free TMA plugin from the Marketplace in your Directual app

<figure><img src="/files/6Vw0JTnIpzXfg0bOVUB2" alt=""><figcaption></figcaption></figure>

There are two settings for the TMA plugin:

<figure><img src="/files/GSiuj5Zdz7dzF1XIHjnh" alt=""><figcaption></figcaption></figure>

* **Auto log in.** `True`: authorises users automatically when they open TMA' `False`: user pushes the button "Log in with Telegram" when open TMA. The latter is used when you want to let your users to authorise in TMA with email, Google, etc.
* **Disable registration**. `True`: user can't log in if there is no `WebUser` with such an ID. `False`: the `WebUser` will be created automatically when user logs in.

{% hint style="warning" %}
If user is signed up with TMA and then wants to log in on the web-browser, he'll need a pair `username/password.` You can generate the one-time password and send the login credentials to the user in Telegram bot.
{% endhint %}

### Step 2. Deploy your Directual app to Telegram

Open [BotFather](https://t.me/BotFather) and create new bot (skip this if you already have a Telegram bot) using command `/newbot`

<figure><img src="/files/ERyNlQJ0IBAB7YkmKWLz" alt=""><figcaption></figcaption></figure>

Then, deploy your Directual-based app as a webapp to that bot using command `/newapp`. Follow the BotFather instructions.

<div><figure><img src="/files/YSO3T05feqBLc528IVr0" alt=""><figcaption></figcaption></figure> <figure><img src="/files/zo9L5n4EnEQMOfUEs72N" alt=""><figcaption></figcaption></figure></div>

Success! Let's test it out! Pay attention, that authentication happens automatically if the user gets to the login page.

<figure><img src="/files/gl87apijXzTG47M1nr29" alt="" width="288"><figcaption></figcaption></figure>
