Browse SDKs · Mini Program
SDKsMini Program

OpenIM Mini Program SDK overview

Use WASM documentation as the shared API baseline and understand Mini Program runtime differences and unavailable local search and clearing APIs.

Copy

The OpenIM Mini Program SDK is designed for Mini Programs and lightweight Web scenarios. Its method-level models for users, conversations, messages, groups, and events are consistent with other OpenIMClientSDKs. However, it does not provide local message storage or several search and clearing APIs that depend on a local database. Follow the WASM SDK documentation for shared capabilities. This page covers only runtime differences and unavailable APIs.

Relationship to WASM

  • Follow the corresponding WASM guide for method semantics, events, and data models.
  • Differences are limited to the initialization entry point, domain allowlists, file selection and uploads, platform lifecycle, and the unavailable APIs listed below.
  • A Web client that needs a complete local message database, conversation cache, and persistent history should use the WASM SDK instead.

APIs unavailable compared with WASM

The Mini Program SDK does not currently provide the following methods. Do not design a product around local full-text search or locally clearing conversation history. Use a business backend for search, or retrieve data with an available paginated query and filter it in the application.

Unavailable APIWASM referenceRecommended alternative
clearConversationAndDeleteAllMsgClear conversation messagesHandle history cleanup through server policy or a business API, then refresh only the current conversation view.
searchLocalMessagesSearch messagesUse a trusted backend message index, then open the result by conversationID and clientMsgID.
searchFriendsSearch friendsRetrieve friends by page and filter them in the application, or use business-directory search.
searchGroupMembersSearch group membersPage through getGroupMemberList results and filter them, or use backend member search.
searchGroupsSearch groupsPage through joined groups and filter them, or use backend group discovery.
findMessageListFind messages by IDRetain message IDs in server or conversation state, then load context through an available history query.

Shared capabilities documented under WASM

Runtime considerations

  • Before testing login, allow the required request, WebSocket, and upload domains in the target platform configuration.
  • Do not make business logic depend on the SDK's local message database or local conversation persistence. Synchronize the required data again after restoring a page.
  • Validate file messages against the target platform's file picker, temporary paths, upload APIs, and size limits.
  • Continue to issue tokens from a trusted backend. The client should receive only short-lived credentials.
  • When using the Mini Program SDK on the Web, limit it to lightweight scenarios. Use the WASM SDK for a full-featured Web IM client.