Server API reference
Server API overview
Use the Server API from a trusted backend to manage application users, issue client tokens, send messages, administer groups, upload files, trigger push notifications, and access AI capabilities.
Architecture and entry point
The Server API is an HTTP JSON interface scoped to one Lanying application. Requests use the api_endpoint for the deployment and authenticate with app_id and access-token headers obtained from the console.
Reference map
Choose the narrowest reference for your task. Each item links to the locally hosted generated API page.
UsersRegister, query, update, freeze, and delete application users.TokensIssue per-user credentials that client SDKs use to sign in safely.RostersManage contacts, applications, relationships, and block-list state.GroupsAdminister groups, membership, roles, moderation, and shared resources.MessagesSend system, one-to-one, group, and attachment messages from the backend.FilesUpload and address media assets used by messages and application features.PushTrigger notifications through the mobile vendors configured for the application.AIAccess server-side AI functions available to the application.Recommended integration flow
- Read api_endpoint, app_id, and access-token from the console and store the access token only in backend secret storage.
- Create or map the application user, then issue a short-lived user token for the relevant client SDK.
- Call resource endpoints from the backend with JSON bodies and explicit error handling, timeouts, and idempotency where applicable.
- Use server-side messaging and administration only for operations authorised by your own application model.
- Rotate secrets and separate hosted, staging, dedicated-cloud, and private-cloud endpoints in configuration.
What to keep in mind
- Never place access-token in browser, mobile, desktop, or Mini Program bundles.
- The deployment-specific api_endpoint is authoritative; do not hard-code the example host for private or dedicated cloud.
- Use the locally hosted Swagger UI for the exact request schema and response model.
Continue reading
Server API
Environment and authentication
Get api_endpoint, app_id, and access-token from the console before making a request. Send app_id and access-token as request headers; JSON is the default content type.
Hosted API endpoint
http://s-1-3-api.maximtop.cn
Use the api_endpoint returned for your application. Dedicated and private deployments use their own endpoint.
Request context
| Field | Description |
|---|---|
api_endpoint | Base URL assigned to the application deployment. |
app_id | Application identifier sent in the request header. |
access-token | Server credential sent in the request header. Never expose it to a client. |
Content-Type | application/json unless an endpoint states otherwise. |
Document version: v1.0