DuliDuli Open Platform
EN
简体中文
繁體中文
English
Quick Start APIs DuliDuli Official Website
模板

Group Management


Enterprises can use group-related interface capabilities to achieve dynamic group creation, adding group members, and group management.


Create Group


Function

Create a group

Parameters

Parameters

Type

Required

Description

org_id

string

Y

Organization (Company) ID

creator_account_id

string

Y

Creator ID

group_name

string

Y

Group Name (no more than 32 Chinese or English characters)

account_list

string[]

Y

Group Member Array

"100000-5000132282" represents:

100000: [Organization ID]

5000132282: [User ID]

Return Result:

Success: Returns group information and group member information.

Failure: An error occurs (such as a failed request), an exception is thrown, see error codes.


Get Group Info


Function

Obtain detailed group information based on the group ID.


Parameter

Parameters

Type

Required

Description

access_token

string

Y

Authentication token

group_id

string

Y

Group ID


Return Result:

Success: Returns group information and group member information.

Failure: An error occurs (such as a failed request), an exception is thrown, see error codes.


Modify Group Name


Function

Modify the group name using the group ID.


Parameter

Parameters

Type

Required

Description

group_id

string

Y

Group ID

group_name

string

Y

Group Name. Cannot exceed 32 characters (including Chinese characters and English letters).


Return Result:

Success: Returns the group ID and group name.

Failure: An error occurs (such as a failed request), an exception is thrown, see error codes.


Add Group Members


Function

Add members to an existing group.


Parameter

Parameters

Type

Required

Description

group_id

string

Y

Group ID

creator_account_id

string

Y

Creator ID

org_id

string

Y

Organization ID

account_list

array

Y

Member List

[{

"org_id": "100000",

"account_id": "5000132294",


}]


Return Result:

Success: Returns the group ID and group name.

Failure: An error occurs (such as a failed request), an exception is thrown, see error codes.


Is Group Member


Function

Determine if a user is a member of a group by group ID and member ID.

Parameter

Parameters

Type

Required

group_id

Y

Group ID

org_id

Y

Organization ID

account_id

Y

Account ID


Return Result:

Success: Returns the group ID and a flag indicating whether the user is a group member: "is_group_member": true // true indicates that the user is a member, false indicates that the user is not a member.

Failure: An error occurs (such as a failed request), an exception is thrown, see error codes.