SDKsuni-app / uni-app x
Set group join verification
Configure approval policies for user join requests and member invitations.
The needVerification property configures the group's admission policy using OpenIMGroupVerificationType.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
groupID | string | Yes | Target group identifier. |
needVerification | OpenIMGroupVerificationType | Yes | The admission verification policy constant. |
| Enum constant | Numeric value | Description |
|---|---|---|
OpenIMGroupVerificationTypeApplyNeedInviteNot | 0 | Join requests require admin review; member invitations add contacts immediately. |
OpenIMGroupVerificationTypeAllNeed | 1 | Both join requests and invitations by regular members require approval; owner and admin invitations join directly. |
OpenIMGroupVerificationTypeAllNot | 2 | Anyone can join or be invited without approval. |
Code example
import {
OpenIMGroupVerificationTypeAllNeed,
setGroupInfo,
} from '@/uni_modules/unix-openim-sdk'
await setGroupInfo({
groupID,
needVerification: OpenIMGroupVerificationTypeAllNeed,
})Return value
The Promise resolves with void once OpenIMServer updates the verification mode.
State changes after the call
A resolved Promise confirms that the verification setting was saved. Update the local group's needVerification field optimistically, and confirm final state when onGroupInfoChanged arrives matching groupID. For complete group event listener registration, see Group overview.
Was this page helpful?