Instant Messaging (IM) can host user relationship chains and offers a complete set of relationship chain solutions. If you do not want to develop or maintain friend relationships for your app users but need features like adding and deleting friends, then you should use IM's relationship chain hosting service.
A relationship chain is a set of data used to describe the relationships between one user and other users. The relationship chains supported by IM include friend lists and blocklists.
The IM relationship chain system supports standard and custom relationship chain fields. Relationship chain fields have the following features:
Tag_SNS_IM_Groupfield of a friend list.)
Users can add up to 3,000 friends to their friend lists in IM.
Friend lists support standard friend fields and custom friend fields.
Currently, IM supports the following standard friend fields:
1. A maximum of 32 lists are supported.
2. The list name cannot be empty.
3. The length of a list name cannot exceed 30 bytes.
4. One friend can be added to multiple different lists.
1. The length of a remark cannot exceed 96 bytes.
|Tag_SNS_IM_AddSource||String||Source from which a friend is added:
1. The source field contains a prefix and keyword.
2. The prefix of the source field is
3. Keyword: must be a combination of letters with a length no more than 8 bytes. You are advised to use an English word or its abbreviation.
4. Example: if the source keyword is Android, the source field is
1. The length of a request cannot exceed 256 bytes.
Custom friend fields are the friend data set by each app based on its own business needs. By using custom friend fields, an app can add additional data to friends and perform read and write operations through existing APIs.
To apply for custom friend fields, the app admin can log in to the IM console and choose App Configuration > Feature Configuration. After the application is submitted, custom friend fields will take effect in 5 minutes.
The naming requirements for custom friend fields are as follows:
Test, the name of the custom friend field is
When applying for custom friend fields, you need to submit the following information for each custom friend field:
IM supports the following modes for adding friends: adding friends in batches, no approval required, and approval required. For more information, see Adding Friends.
Two-way friends: user A's friend list contains user B, and user B's friend list contains user A.
One-way friend: user A's friend list contains user B, but user B's friend list does not contain user A.
Verification method for adding friends: each user can choose the way with which he/she is added as a friend by another user. For more information, see the verification method field for adding friends in Standard Profile Fields.
No approval required: if the approval method for friend requests set by account A is
AllowType_Type_AllowAny, then anyone who wants to add account A as a friend can directly add it. In this scenario, the friend request and acceptance process has one step.
Approval required: if the approval method for friend requests set by account A is
AllowType_Type_NeedConfirm, then for anyone who wants to add account A as a friend, account A will receive a message asking it to approve the new friend request. Then, account A accepts or rejects the request to complete the process. In this scenario, the friend request and acceptance process has two steps.
IM supports two modes for deleting friends: one-way deletion and two-way deletion.
IM also supports deleting friends in batches. For more information, see Deleting Friends.
IM supports two friend verification modes: one-way friend verification and two-way friend verification.
|One-way friend verification||CheckResult_Type_Single||This is used to check whether
|Two-way friend verification||CheckResult_Type_Both||This is used to check whether
Possible results of one-way friend verification are:
Possible results of two-way friend verification are:
For more information on friend verification, see Verifying Friends.
Each user has a blocklist, which is used to store the accounts blocked by this user.
After user A adds user B to the blocklist, user A will unfriend user B (if they are friends), and users A and B cannot send friend requests to each other in the future.
Each user can add up to 1,000 accounts to their IM blocklist.
IM allows you to add users to the blocklist in batches. For more information, see Blocklisting Users.
IM allows you to remove users from the blocklist in batches. For more information, see Unblocklisting Users.
IM supports pulling a full blocklist by page. For more information, see Pulling a Blocklist.
IM supports two blocklist verification modes: one-way verification and two-way verification.
|One-way verification||BlackCheckResult_Type_Single||This is used to check whether
|Two-way verification||BlackCheckResult_Type_Both||This is used not only to check whether
Possible results of one-way blocklist relationship verification are:
Possible results of two-way blocklist relationship verification are:
For more information on blocklist verification, see Verifying Blocklist.