line-mini-app
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseLINE MINI App
LINE MINI App
Do not answer LINE MINI App questions from memory — LINE updates APIs frequently and training data is unreliable. Always consult the references below.
LINE MINI App is a web app platform built on LIFF that runs inside LINE.
不要凭记忆回答LINE MINI App相关问题——LINE会频繁更新API,训练数据不可靠,请始终参考以下文档。
LINE MINI App是构建在LIFF之上、运行在LINE内部的Web应用平台。
Workflow
工作流程
- Read references/guidelines.md first (policy rules, specs, constraints)
- Load the relevant reference for the feature being worked on
- For architecture or design choices, consult references/experts.md
- When reviewing, cross-check code against specs (token lifecycle, message limits, scope requirements, template naming, IAP order flow)
- 首先阅读references/guidelines.md(政策规则、规范、约束)
- 加载正在开发的功能对应的相关参考文档
- 架构或设计选型时,请参考references/experts.md
- 审核时,对照规范交叉检查代码(令牌生命周期、消息限制、作用域要求、模板命名、IAP订单流程)
Environment Variables
环境变量
LIFF_ID=LIFF app ID (LINE MINI App runs on LIFF)
LINE_CHANNEL_ACCESS_TOKEN=Stateless channel access token (Service Messages, IAP)
LINE_LOGIN_CHANNEL_ID=LINE Login Channel ID (server-side verification)
LINE_LOGIN_CHANNEL_SECRET=Channel secret (server-side only)LIFF_ID=LIFF app ID (LINE MINI App runs on LIFF)
LINE_CHANNEL_ACCESS_TOKEN=Stateless channel access token (Service Messages, IAP)
LINE_LOGIN_CHANNEL_ID=LINE Login Channel ID (server-side verification)
LINE_LOGIN_CHANNEL_SECRET=Channel secret (server-side only)MINI App vs LIFF
MINI App与LIFF对比
| Feature | LIFF | MINI App |
|---|---|---|
| Service Messages | ✗ | ✅ Proactive notifications via notification token |
| Common Profile Quick Fill | ✗ | ✅ Auto-fill forms with LINE profile data |
| In-App Purchase | ✗ | ✅ App store payments (iOS/Android) |
| Submission review | Not required | Required (LINE review process) |
| Entry point | LIFF URL | LINE MINI App list + LIFF URL |
All LIFF APIs are available in MINI App context (LIFF browser). See Key Constraints for external browser limitations.
| 功能 | LIFF | MINI App |
|---|---|---|
| 服务消息 | ✗ | ✅ 通过通知令牌主动推送通知 |
| 通用资料快速填充 | ✗ | ✅ 用LINE资料数据自动填充表单 |
| 应用内购买 | ✗ | ✅ 应用商店支付(iOS/Android) |
| 提交审核 | 不需要 | 需要(LINE审核流程) |
| 入口 | LIFF URL | LINE MINI App列表 + LIFF URL |
所有LIFF API都可在MINI App上下文(LIFF浏览器)中使用,外部浏览器限制请参见关键约束。
Service Messages
服务消息
User opens MINI App → liff.getAccessToken() → Issue notification token → Send service messages (max 5)- Token validity: 1 year, max 5 messages per token
- LIFF access token is revoked when user closes the MINI App — issue notification token before user leaves
Full API specs, template structure, error codes → references/service-messages.md
User opens MINI App → liff.getAccessToken() → Issue notification token → Send service messages (max 5)- 令牌有效期:1年,每个令牌最多发送5条消息
- LIFF访问令牌会在用户关闭MINI App时被撤销——请在用户离开前获取通知令牌
完整API规范、模板结构、错误码 → references/service-messages.md
Common Profile Quick Fill
通用资料快速填充
javascript
const result = await liff.$commonProfile.get(scopes, { formatOptions });
liff.$commonProfile.fill(result.data); // auto-fill <input data-liff-autocomplete="...">Full API specs, scopes, dummy data → references/common-profile.md
javascript
const result = await liff.$commonProfile.get(scopes, { formatOptions });
liff.$commonProfile.fill(result.data); // auto-fill <input data-liff-autocomplete="...">完整API规范、作用域、模拟数据 → references/common-profile.md
In-App Purchase
应用内购买
Japan only. Consumable digital content only. Requires LIFF SDK ≥ 2.26.0, LINE ≥ 15.6.0, LIFF browser.
Purchase flow (client + server), dev guidelines, error codes → references/in-app-purchase.md
仅面向日本地区,仅支持可消耗数字内容。要求LIFF SDK ≥ 2.26.0、LINE ≥ 15.6.0、LIFF浏览器。
购买流程(客户端+服务端)、开发指南、错误码 → references/in-app-purchase.md
Key Constraints
关键约束
- MINI App runs on LIFF — all LIFF constraints apply (Endpoint URL, init order, environment differences)
- Stateless channel access tokens only — long-lived and v2.1 tokens cannot be used for MINI App channels
- Channel consent simplification only skips —
openid,profile,emailrequire verification screen; needs LIFF SDK v2.13.x+, verified MINI Appchat_message.write - Custom share messages must use Bubble container (not Carousel); actions only on buttons and footer
- External browser: doesn't auto-login (use
liff.init());withLoginOnExternalBrowser: true,sendMessages,openWindow,closeWindowunavailableiap.* - LINE Pay terminated in Japan (April 30, 2025) — verify current availability at LINE Pay docs
- IAP auth differs by endpoint: reserve uses user token, webhook history uses channel token; webhook uses signature verification, not IP restriction
- Channel cannot be moved to another provider after creation; user IDs differ per provider
- MINI App运行在LIFF之上——所有LIFF约束均适用(端点URL、初始化顺序、环境差异)
- 仅支持无状态渠道访问令牌——MINI App渠道不可使用长期令牌和v2.1令牌
- 渠道同意简化仅跳过——
openid、profile、email需要验证界面;要求LIFF SDK v2.13.x及以上、已验证的MINI Appchat_message.write - 自定义分享消息必须使用Bubble容器(不能用Carousel);仅支持按钮和页脚的交互动作
- 外部浏览器:不会自动登录(请使用
liff.init());withLoginOnExternalBrowser: true、sendMessages、openWindow、closeWindow不可用iap.* - LINE Pay将于2025年4月30日在日本终止服务——请在LINE Pay文档确认当前可用性
- IAP身份验证因端点不同而有差异:预留操作使用用户令牌,Webhook历史使用渠道令牌;Webhook使用签名验证,而非IP限制
- 渠道创建后无法迁移至其他提供商;不同提供商的用户ID不互通
Reference Index
参考索引
| File | Topic |
|---|---|
| references/guidelines.md | Read first. MINI App overview, verified vs unverified, specs, performance, migration, development rules, Quick Fill design regulations |
| references/console-setup.md | Channel creation, 3 internal channels, LIFF ID, tokens, basic auth, display mapping, localization, settings reflection, re-review |
| references/features.md | Built-in features (action button, multi-tab, consent simplification), custom features (Custom Path, shortcuts, custom action button, share messages, OA, payments), permanent links, external browser, UI components |
| references/service-messages.md | Notification token lifecycle, sending API, template structure, review lifecycle, character limits, error codes |
| references/common-profile.md | Quick Fill API, scopes, form auto-fill, plugin setup, dummy data |
| references/in-app-purchase.md | Purchase flow (client + server), reserve, webhooks, dev guidelines, application & setup, test payment, error codes |
| references/submission-review.md | Submission process, pre-review checklist, review period, approval flow, publish changes |
| references/experts.md | LINE MINI App domain experts for architecture guidance |
| 文件 | 主题 |
|---|---|
| references/guidelines.md | 请优先阅读。 MINI App概述、已验证/未验证对比、规范、性能、迁移、开发规则、快速填充设计规范 |
| references/console-setup.md | 渠道创建、3个内部渠道、LIFF ID、令牌、基础认证、展示映射、本地化、配置生效、重新审核 |
| references/features.md | 内置功能(动作按钮、多标签、同意简化)、自定义功能(自定义路径、快捷方式、自定义动作按钮、分享消息、OA、支付)、永久链接、外部浏览器、UI组件 |
| references/service-messages.md | 通知令牌生命周期、发送API、模板结构、审核生命周期、字符限制、错误码 |
| references/common-profile.md | 快速填充API、作用域、表单自动填充、插件配置、模拟数据 |
| references/in-app-purchase.md | 购买流程(客户端+服务端)、预留、Webhook、开发指南、申请与配置、测试支付、错误码 |
| references/submission-review.md | 提交流程、预审检查清单、审核周期、审批流程、发布变更 |
| references/experts.md | 提供LINE MINI App架构指导的领域专家 |
SDK & Tools
SDK与工具
- LINE MINI App is built on LIFF SDK: @line/liff
- Quick Fill plugin: @line/liff-common-profile-plugin
- Scaffold:
npx @line/create-liff-app - LINE MINI App Playground: miniapp.line.me/lineminiapp_playground — online MINI App API testing
- LINE MINI App基于LIFF SDK构建:@line/liff
- 快速填充插件:@line/liff-common-profile-plugin
- 脚手架:
npx @line/create-liff-app - LINE MINI App Playground:miniapp.line.me/lineminiapp_playground — 在线MINI App API测试工具