# Build apps for Lia

> Lia's developer docs. Build a web app that runs inside the Lia app, with players signed in, payments in $LIA on Lia's pay sheet, invites, notifications, ads, leaderboards and storage. From the Lia developer docs: https://docs.lialabs.org/

<div class="hero">
<span class="label">Lia SDK 1.6.0</span>
<h1>Build apps for Lia. <span>We bring the people.</span></h1>
<p>Your web app opens inside the Lia app, in front of people who already use it every day. Add one script and every player arrives signed in, in their own language and theme, with $LIA payments, invites and the rest already built.</p>
<div class="btns"><a class="btn btn-white" href="/quickstart">Start building</a><a class="btn btn-onblue" href="/reference/sdk">SDK reference</a></div>
</div>

## What a Lia app is

A Lia app is a web page you build and host yourself. People open it from the Apps Center in the Lia app, and it runs inside Lia, much like a Telegram mini app. Your page loads the Lia SDK from Lia, and the SDK is how it talks to Lia: who the player is, the pay sheet, the friend picker, notifications, ads, storage and the phone itself.

Your app can also have its own server. It calls Lia's server API with your secret key to check what the browser tells it: that a session is real, that a charge was paid, that a video was watched. Nothing important ever trusts the browser.

```html
<script src="https://api.lialabs.org/sdk/lia-apps-v1.js"></script>
<script>
  Lia.init().then(function (me) {
    document.body.textContent = "Hello, @" + me.player.name;
    Lia.ready();
  });
</script>
```

## Start here

<div class="cards">
<a class="card" href="/quickstart" style="--c:var(--blue)"><span class="ico"><svg class="i"><use href="#i-rocket"/></svg></span><b>Quickstart</b><span>A working app in Lia in a few minutes: the script, init and ready.</span></a>
<a class="card" href="/access" style="--c:var(--strides)"><span class="ico"><svg class="i"><use href="#i-key"/></svg></span><b>Getting access</b><span>How your app is added to Lia, and how you get your keys today.</span></a>
<a class="card" href="/concepts/how-apps-run" style="--c:var(--spin)"><span class="ico"><svg class="i"><use href="#i-phone"/></svg></span><b>How apps run in Lia</b><span>The frame, the three looks, the header and its menu, and the rules.</span></a>
<a class="card" href="/packages" style="--c:var(--tasks)"><span class="ico"><svg class="i"><use href="#i-code"/></svg></span><b>npm packages</b><span>Typed SDK with hooks for React, Vue, Svelte, Solid, Angular and more.</span></a>
<a class="card" href="/guides/sell-an-item" style="--c:var(--mine)"><span class="ico"><svg class="i"><use href="#i-wallet"/></svg></span><b>Sell an item</b><span>Lia's pay sheet, then confirm and deliver on your server.</span></a>
</div>

## Everything in the SDK

<div class="cards">
<a class="card" href="/concepts/players-and-sessions" style="--c:var(--invite)"><span class="ico"><svg class="i"><use href="#i-users"/></svg></span><b>Players and sessions</b><span>Every player arrives signed in, with a session your server can verify.</span></a>
<a class="card" href="/concepts/payments" style="--c:var(--mine)"><span class="ico"><svg class="i"><use href="#i-wallet"/></svg></span><b>Payments</b><span>People pay in $LIA on Lia's own sheet, at the price in Lia's records.</span></a>
<a class="card" href="/concepts/reward-pools" style="--c:var(--board)"><span class="ico"><svg class="i"><use href="#i-gift"/></svg></span><b>Reward pools</b><span>Pay players in $LIA from a pool the Lia team funds for your app.</span></a>
<a class="card" href="/concepts/invites" style="--c:var(--invite)"><span class="ico"><svg class="i"><use href="#i-share"/></svg></span><b>Invites</b><span>A friend picker and links that open your app in the right room.</span></a>
<a class="card" href="/concepts/notifications" style="--c:var(--strides)"><span class="ico"><svg class="i"><use href="#i-bell"/></svg></span><b>Notifications</b><span>Only for people who allow them, with limits so nobody is spammed.</span></a>
<a class="card" href="/concepts/ads" style="--c:var(--spin)"><span class="ico"><svg class="i"><use href="#i-video"/></svg></span><b>Ads</b><span>Rewarded and between round videos, played and paced by Lia.</span></a>
<a class="card" href="/guides/scores-and-saves" style="--c:var(--board)"><span class="ico"><svg class="i"><use href="#i-trophy"/></svg></span><b>Leaderboards and storage</b><span>Best scores, cloud saves, storage on the phone and in its Keychain.</span></a>
<a class="card" href="/concepts/look-and-feel" style="--c:var(--tasks)"><span class="ico"><svg class="i"><use href="#i-language"/></svg></span><b>Look and feel</b><span>Lia's theme, 13 languages, safe areas, buttons, haptics and sound.</span></a>
<a class="card" href="/reference/sdk-device" style="--c:var(--strides)"><span class="ico"><svg class="i"><use href="#i-move"/></svg></span><b>The phone</b><span>Motion sensors, Face ID, the QR scanner, the clipboard and links.</span></a>
</div>

## How the pieces fit

<ol class="flow">
<li><b>The person opens your app in Lia</b><span>Lia opens your page in its frame and signs the person in for you, as a player of your app.</span></li>
<li><b>Your page calls the SDK</b><span><code>Lia.init()</code> gives you the player, a session token, their language and theme. Everything else is a call away.</span></li>
<li><b>Lia does the sensitive parts</b><span>Payments, ads, invites and permissions happen in Lia's own screens over your app, never in your page.</span></li>
<li><b>Your server checks</b><span>With your secret key, your server verifies sessions, charges and watched videos, and pays rewards from your pool.</span></li>
</ol>

## Addresses

| What | Where |
| --- | --- |
| The SDK | `https://api.lialabs.org/sdk/lia-apps-v1.js` |
| The server API | `https://api.lialabs.org/api/apps/v1` |
| The SDK demo (opens inside Lia) | `https://api.lialabs.org/sdk/demo` |
| Invite links | `https://api.lialabs.org/play/<app id>` |
| These docs as Markdown, for AI tools | [`/llms.txt`](/llms.txt) and [`/llms-full.txt`](/llms-full.txt) |

> **Note** In Q1 2027 you'll sign up to the Lia developers dashboard to add your app and get its keys yourself. Until it opens, the Lia team sets your app up and gives you its keys. See [Getting access](/access).
