Browse SDKs · uni-app / uni-app x
SDKsuni-app

Set group join verification

OpenIM uni-app / uni-app x SDK guide for Set group join verification.

Copy

Use setGroupInfo() to change how future applications and invitations are verified.

import { setGroupInfo } from '@/uni_modules/unix-openim-sdk'

await setGroupInfo({ groupID, needVerification: 1 })

The OpenIMGroupNeedVerification range is:

needVerificationMeaning
0User applications require review; member invitations can join directly.
1Applications and ordinary-member invitations require review; owner/admin invitations are exempt.
2Applications and invitations can join directly.

Use the exported contract type rather than a UI index. The client can explain the policy, but OpenIMServer remains authoritative. It affects future applications and invitations and does not reprocess existing members or pending requests.

After Promise success, merge the latest group through onGroupInfoChanged by groupID or query it again.