> For the complete documentation index, see [llms.txt](https://neurosell.gitbook.io/parallelix/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://neurosell.gitbook.io/parallelix/api-reference/telegram-mini-apps.md).

# Telegram Mini Apps

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

### What is Telegram Mini Apps (Web Apps)

**Telegram** mini apps are web-based applications that run directly within the Telegram messaging app. They offer a more immersive and interactive experience than standard web links or bots, and they can be used to create a wide range of experiences, from e-commerce and games to productivity tools and more.

[**You can learn more here**](https://core.telegram.org/bots/webapps).

***

### Telegram Mini Apps Platform Module (ParallelixTelegram)

{% hint style="warning" %}
**Module Name:** "telegram"
{% endhint %}

Any of our modules **inherits from** [ParallelixWrapper](/parallelix/api-reference/general-client.md#parallelixwrapper-class) - a virtual class describing a **unified SDK structure**.\
Below we have described the peculiarities of working with the module, as well as the differences and description of API parameters for the current module.

#### PlatformSpecificParameters

**These are parameters** that are passed inside some module methods. When working with them, you need to **create subobjects** as [described in the documentation on working with such parameters](/parallelix/api-reference/general-client.md#platformspecificparameters).\
Inside this subobject are the parameters described in the documentation of a particular platform.

**Below we have described each method available for calling, its parameters with a reference to the official documentation and the name of the official method.**

***

### **Platform Specific configuration**

No specific configuration provided for this platform

### **API Reference**

{% hint style="warning" %}
Most Telegram methods don't have Callback functions to check the state of the action, so an empty object will be sent as data in onSuccess.
{% endhint %}

All methods called by Invoker, described as (window\.Telegram.WebApp) in [official documentation](https://core.telegram.org/bots/webapps#initializing-mini-apps).

| Method           | Official Method / Description                                                                                  |
| ---------------- | -------------------------------------------------------------------------------------------------------------- |
| GetLaunchParams  | initDataUnsafe field                                                                                           |
| HandleEvents     | onEvent                                                                                                        |
| GetClientInfo    | <p><strong>Returns object with:</strong></p><p>platform</p><p>version</p><p></p><p>fields from invoker</p>     |
| ToggleFullscreen | requestFullscreen                                                                                              |
| AddToHomeScreen  | addToHomeScreen                                                                                                |
| OpenPaymentForm  | openInvoice                                                                                                    |
| PublishStory     | shareToStory                                                                                                   |
| OpenLink         | openLink                                                                                                       |
| GetStorage       | View in [PWA class](/parallelix/api-reference/pwa-and-web-applications.md)                                     |
| SetStorage       | View in [PWA class](/parallelix/api-reference/pwa-and-web-applications.md)                                     |
| CloseApplication | close                                                                                                          |
| ShowQRReader     | showScanQrPopup                                                                                                |
| RequestUserPhone | requestContact                                                                                                 |
| GetUserInfo      | Calls GetLaunchParams and return object from <mark style="background-color:yellow;">initDataUnsafe.user</mark> |
| RequestLocation  | <mark style="background-color:yellow;">LocationManager.getLocation</mark>                                      |
| GoBack           | Go back to previous page (window\.history.back())                                                              |

***

### Call directly methods from Telegram SDK

To query methods directly, using the same syntax as in the official documentation, **use the following approach**:

```javascript
// Parallelix Direct Calls
client.Platform.Invoker.[YOUR_METHOD]

// Equivalient of
window.Telegram.WebApp.[FIELD_OR_METHOD]
```
