Zalo Mini App Development
Build Mini Apps for the Zalo platform using React, ZaUI, zmp-sdk, Zalo Mini App CLI/Extension, and platform Open APIs.
Docs baseline: official Zalo Mini App docs checked on 2026-06-24.
Quick Start
npm install -g zmp-cli
zmp create my-app
cd my-app
zmp start
Core packages:
npm install zmp-ui zmp-sdk
import { App, Page, Button, Input, Modal } from "zmp-ui";
import "zmp-ui/zaui.css";
import { getUserInfo, authorize } from "zmp-sdk/apis";
Current package versions observed on 2026-06-24:
zmp-sdk: 2.51.x
zmp-ui: 1.11.x
zmp-cli: 4.0.x
Always verify package types in the installed project when implementing exact props or SDK return types.
References
Setup & Release
- getting-started.md - Create app, auth, permissions, CLI/Extension, test, publish
- design-guidelines.md - Zalo design standards and review checklist
- web-design-guidelines.md - Accessibility, mobile UX, forms, performance
- react-best-practices.md - Waterfalls, bundle size, re-renders, JS performance
SDK APIs
- api-overview.md - API groups, import patterns, error handling
- api-user.md - authorize, getUserInfo, token-based getPhoneNumber, getAccessToken
- api-storage.md - Storage APIs and legacy aliases
- api-ui.md - toast, navigation bar, webview, routing
- api-device.md - location, camera, media picker, document, QR/NFC, network
- api-local-file-storage.md - Local File Storage APIs
- api-permission-biometric.md - permissions and biometric auth
- api-advertising-widgets.md - ads and function/OA widgets
- api-zalo.md - OA, chat, sharing, profile, shortcuts
Payment / Backend APIs
ZaUI Components
- zaui-overview.md - Component list and design tokens
- zaui-layout.md - App, Page, Header, Router, BottomNavigation, Box utilities
- zaui-display.md - Avatar, Icon, List, Swiper, Calendar, Text
- zaui-form.md - Button, Input, Select, DatePicker, OTP, Slider
- zaui-overlay.md - Modal, Sheet, ActionSheet, SnackbarProvider
Critical Current Patterns
Phone Number: Token Flow, Not Direct Number
import { getPhoneNumber } from "zmp-sdk/apis";
const { token } = await getPhoneNumber({});
// Send token to backend immediately.
// Backend exchanges token with Zalo Open API to get the actual phone number.
// Token is single-use and short-lived.
Do not expect getPhoneNumber to return { number } in current docs.
Location: Token Flow, Not Direct Coordinates
import { getLocation } from "zmp-sdk/apis";
const { token } = await getLocation();
// Send token to backend for Zalo Open API exchange.
Do not expect getLocation to return direct { latitude, longitude } in current docs.
Local File Storage: LFSStorage Namespace
import { LFSStorage } from "zmp-sdk/apis";
const { support } = await LFSStorage.isSupportLFS();
const { savedPath } = await LFSStorage.saveFile({ filePath: "local-temp-path" });
Use filePath / savedPath, not old tempFilePath helpers.
Media Picker: Current Shape
import { openMediaPicker } from "zmp-sdk/apis";
const { data } = await openMediaPicker({
type: "photo",
maxSelectItem: 5,
serverUploadUrl: "https://example.com/upload"
});
Use maxSelectItem, not maxSelection.
Basic Page Layout
import { App, Page, Header, List, Icon, BottomNavigation } from "zmp-ui";
export default function Root() {
return (
<App>
<Page>
<Header title="Home" />
<List>
<List.Item title="Item" suffix={<Icon icon="zi-chevron-right" />} />
</List>
</Page>
<BottomNavigation fixed>
<BottomNavigation.Item key="home" label="Home" icon={<Icon icon="zi-home" />} />
</BottomNavigation>
</App>
);
}
Resources
1---2name: zalo-mini-app3description: Build Zalo Mini Apps - lightweight React web apps running inside the Zalo super-app. Use for Zalo Mini App setup, zmp-cli/devtools, ZaUI 1.11.x components, zmp-sdk APIs, permissions, token-based phone number flow, user info, storage, local file storage, camera/media, document preview, payment/Checkout, Open APIs, partner APIs, KYB/eKYC, publication, testing, and Zalo design guidelines.4---56# Zalo Mini App Development78Build Mini Apps for the Zalo platform using React, ZaUI, zmp-sdk, Zalo Mini App CLI/Extension, and platform Open APIs.910Docs baseline: official Zalo Mini App docs checked on **2026-06-24**.1112## Quick Start1314```bash15npm install -g zmp-cli16zmp create my-app17cd my-app18zmp start19```2021Core packages:2223```bash24npm install zmp-ui zmp-sdk25```2627```tsx28import { App, Page, Button, Input, Modal } from "zmp-ui";29import "zmp-ui/zaui.css";30import { getUserInfo, authorize } from "zmp-sdk/apis";31```3233Current package versions observed on 2026-06-24:3435- `zmp-sdk`: 2.51.x36- `zmp-ui`: 1.11.x37- `zmp-cli`: 4.0.x3839Always verify package types in the installed project when implementing exact props or SDK return types.4041## References4243### Setup & Release44- [getting-started.md](./references/getting-started.md) - Create app, auth, permissions, CLI/Extension, test, publish45- [design-guidelines.md](./references/design-guidelines.md) - Zalo design standards and review checklist46- [web-design-guidelines.md](./references/web-design-guidelines.md) - Accessibility, mobile UX, forms, performance47- [react-best-practices.md](./references/react-best-practices.md) - Waterfalls, bundle size, re-renders, JS performance4849### SDK APIs50- [api-overview.md](./references/api-overview.md) - API groups, import patterns, error handling51- [api-user.md](./references/api-user.md) - authorize, getUserInfo, token-based getPhoneNumber, getAccessToken52- [api-storage.md](./references/api-storage.md) - Storage APIs and legacy aliases53- [api-ui.md](./references/api-ui.md) - toast, navigation bar, webview, routing54- [api-device.md](./references/api-device.md) - location, camera, media picker, document, QR/NFC, network55- [api-local-file-storage.md](./references/api-local-file-storage.md) - Local File Storage APIs56- [api-permission-biometric.md](./references/api-permission-biometric.md) - permissions and biometric auth57- [api-advertising-widgets.md](./references/api-advertising-widgets.md) - ads and function/OA widgets58- [api-zalo.md](./references/api-zalo.md) - OA, chat, sharing, profile, shortcuts5960### Payment / Backend APIs61- [payment-checkout.md](./references/payment-checkout.md) - Payment integration, order, callback, status, refund62- [open-apis.md](./references/open-apis.md) - Open APIs, partner APIs, signature verification, KYB notes63- [ekyc-apis.md](./references/ekyc-apis.md) - eKYC API map and secure integration notes6465### ZaUI Components66- [zaui-overview.md](./references/zaui-overview.md) - Component list and design tokens67- [zaui-layout.md](./references/zaui-layout.md) - App, Page, Header, Router, BottomNavigation, Box utilities68- [zaui-display.md](./references/zaui-display.md) - Avatar, Icon, List, Swiper, Calendar, Text69- [zaui-form.md](./references/zaui-form.md) - Button, Input, Select, DatePicker, OTP, Slider70- [zaui-overlay.md](./references/zaui-overlay.md) - Modal, Sheet, ActionSheet, SnackbarProvider7172## Critical Current Patterns7374### Phone Number: Token Flow, Not Direct Number7576```ts77import { getPhoneNumber } from "zmp-sdk/apis";7879const { token } = await getPhoneNumber({});80// Send token to backend immediately.81// Backend exchanges token with Zalo Open API to get the actual phone number.82// Token is single-use and short-lived.83```8485Do **not** expect `getPhoneNumber` to return `{ number }` in current docs.868788### Location: Token Flow, Not Direct Coordinates8990```ts91import { getLocation } from "zmp-sdk/apis";9293const { token } = await getLocation();94// Send token to backend for Zalo Open API exchange.95```9697Do **not** expect `getLocation` to return direct `{ latitude, longitude }` in current docs.9899### Local File Storage: LFSStorage Namespace100101```ts102import { LFSStorage } from "zmp-sdk/apis";103104const { support } = await LFSStorage.isSupportLFS();105const { savedPath } = await LFSStorage.saveFile({ filePath: "local-temp-path" });106```107108Use `filePath` / `savedPath`, not old `tempFilePath` helpers.109110### Media Picker: Current Shape111112```ts113import { openMediaPicker } from "zmp-sdk/apis";114115const { data } = await openMediaPicker({116 type: "photo",117 maxSelectItem: 5,118 serverUploadUrl: "https://example.com/upload"119});120```121122Use `maxSelectItem`, not `maxSelection`.123124### Basic Page Layout125126```tsx127import { App, Page, Header, List, Icon, BottomNavigation } from "zmp-ui";128129export default function Root() {130 return (131 <App>132 <Page>133 <Header title="Home" />134 <List>135 <List.Item title="Item" suffix={<Icon icon="zi-chevron-right" />} />136 </List>137 </Page>138 <BottomNavigation fixed>139 <BottomNavigation.Item key="home" label="Home" icon={<Icon icon="zi-home" />} />140 </BottomNavigation>141 </App>142 );143}144```145146## Resources147148- Docs: https://miniapp.zaloplatforms.com/documents/149- API: https://miniapp.zaloplatforms.com/documents/api/150- ZaUI: https://miniapp.zaloplatforms.com/documents/zaui/151- Payment: https://miniapp.zaloplatforms.com/documents/payment/152- Open APIs: https://miniapp.zaloplatforms.com/documents/open-apis/153- Mini App Center: https://miniapp.zaloplatforms.com/