Browse SDKs · React Native
Platform
SDKsReact NativeIncludes Enterprise features

Get received group applications

Paginate and retrieve incoming group join applications as owner or admin using the OpenIM React Native SDK.

Copy

Group owners and administrators can paginate and query join requests received across administered groups, filtering by group IDs and handling statuses:

const applications = await OpenIMSDK.getGroupApplicationListAsRecipient({
  groupIDs: ['group-001'],
  handleResults: [ApplicationHandleResult.Unprocessed],
  offset: 0,
  count: 20,
});

Parameters

ParameterTypeRequiredDescription
groupIDsstring[]YesList of group IDs to filter by; pass empty array [] to query all administered groups.
handleResultsnumber[]YesList of handle statuses to filter by; pass empty array [] to match all.
offsetnumberYesPagination offset starting from 0.
countnumberYesMaximum number of records to retrieve.

ApplicationHandleResult status values:

Enum valueValueDescription
ApplicationHandleResult.Unprocessed0Pending review.
ApplicationHandleResult.Agree1Approved.
ApplicationHandleResult.Reject-1Rejected.

Return value

Resolves to an array of GroupApplicationItem[] for the requested page. When the returned count is less than count, the end of the list has been reached. Reconcile entries using the composite key groupID:userID.

Group application properties

FieldTypeDescription
groupIDstringTarget group ID of the application.
userIDstringApplicant user ID.
nicknamestringApplicant nickname at the time of application.
userFaceURLstringApplicant avatar image URL at the time of application.
reqMsgstringApplication greeting message.
reqTimenumberTimestamp when the application was submitted.
joinSourceGroupJoinSourceJoin discovery channel.
handleResultApplicationHandleResultCurrent handling status.
handleUserIDstringUser ID of the operator who processed the request.
handledMsgstringOperator note text.
handledTimenumberProcessing timestamp.
groupNamestringGroup name snapshot in the application record.
groupFaceURLstringGroup avatar URL snapshot in the application record.
groupTypeGroupTypeGroup type.
ownerUserIDstringGroup owner user ID.
creatorUserIDstringGroup creator user ID.
introductionstringGroup description snapshot.
notificationstringGroup announcement snapshot.
memberCountnumberMember count snapshot.
statusGroupStatusGroup status snapshot.
createTimenumberApplication creation timestamp in Unix milliseconds.
exstringCustom extension string.

User and group profiles within application records reflect historical snapshots at submission time. To render real-time profiles, query current user or group endpoints separately.

Listen for group application changes

Application mutations trigger OnGroupApplicationAdded, OnGroupApplicationAccepted, OnGroupApplicationRejected, or OnGroupApplicationDeletedEnterprise. Reconcile state items using the composite key groupID:userID:

const handleApplicationChanged = (application: GroupApplicationItem) => {
  // Update application matching application.groupID and application.userID
};

const handleApplicationDeleted = (application: GroupApplicationItem) => {
  // Remove application matching application.groupID and application.userID
};

// Register listeners
OpenIMSDK.on(OpenIMEvent.OnGroupApplicationAdded, handleApplicationChanged);
OpenIMSDK.on(OpenIMEvent.OnGroupApplicationAccepted, handleApplicationChanged);
OpenIMSDK.on(OpenIMEvent.OnGroupApplicationRejected, handleApplicationChanged);
OpenIMSDK.on(OpenIMEvent.OnGroupApplicationDeleted, handleApplicationDeleted);

// Remove listeners
OpenIMSDK.off(OpenIMEvent.OnGroupApplicationAdded, handleApplicationChanged);
OpenIMSDK.off(OpenIMEvent.OnGroupApplicationAccepted, handleApplicationChanged);
OpenIMSDK.off(OpenIMEvent.OnGroupApplicationRejected, handleApplicationChanged);
OpenIMSDK.off(OpenIMEvent.OnGroupApplicationDeleted, handleApplicationDeleted);

Unregister these listeners when the screen unmounts, the user logs out, or accounts switch.