Permissions
Declare every capability in manifest.permissions. Reviewers approve that exact list, and the API refuses any call to a capability that wasn't approved, even if someone modifies the host or the Mini Program.
| Capability | Grants | SDK call |
|---|---|---|
ui.notifications | Show notifications in Lex, labelled with your Mini Program's name | notify() |
storage.scoped | Read and write data private to this user and this Mini Program | storage.get/set/remove/keys() |
storage.workspace | Read and write data shared with everyone in the workspace, in this Mini Program only | workspace.get/set/remove/keys/list() |
agent.request | Ask a Lex assistant. It answers without tools, so it can't act on anyone's accounts. Workspace usage limits apply. | requestAgent() |
ai.text | Write and answer text with Lexcetha's AI model | ai.text() |
ai.transcribe | Turn speech into text with Lexcetha's AI model | ai.transcribe() |
ai.speak | Read text aloud with Lexcetha's AI voice | ai.speak() |
ai.image | Create images with Lexcetha's AI model | ai.image() |
ai.video | Create videos with Lexcetha's AI model | ai.video.* |
media.microphone | Record audio from the person's microphone when they allow it | media.recordAudio() |
getContext() needs no permission. It returns the user's id and display name, your Mini Program's id and version, and the locale; never an email, workspace id or token.
AI and microphone
The ai.* permissions are paid by you, the developer, in AI credits; the workspace using your Mini Program is never charged, and each person has a daily limit you set. See AI models & credits. Ask only for the ones you use: reviewers check each one, and people see the list when they install.
media.microphone does not give your iframe the microphone. Lex asks the person, records in its own page, and hands your Mini Program the finished audio. The person can cancel at any time.
Not available, by design
- Network access (
fetch, WebSockets, images or scripts from other servers) - Direct camera or microphone access (
getUserMedia); usemedia.recordAudio()instead - Cookies,
localStorage, IndexedDB - The Lex page around the iframe (
window.parent, the host DOM) - Filesystem, shell or database access
- Running connector tools or reading connected accounts
There is no broad integrations.* permission. Specific integration capabilities will only be added together with a backend policy that controls them.
