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 relationship features 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 characteristics:
Tag_SNS_IM_Groupfield of a friend list)
Users can add up to 3,000 friends to their contacts in IM.
Contacts 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 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: It must be a combination of letters with no more than 8 bytes. We recommend that you 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.
|Tag_SNS_IM_AddTime||Integer||Timestamp of adding friends.|
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 select 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 is a friend of user B, and user B is a friend of user A.
One-way friend: user A is a friend of user B, but user B is not a friend of 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 account A. In this scenario, there is one step in the friend request and acceptance process.
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 whether to approve the new friend request. Then, account A accepts or rejects the request to complete the process. In this scenario, there are two steps in the friend request and acceptance process.
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 multiple users to a blocklist at a time. For more information, see Blocklisting Users.
IM allows you to remove multiple users from a blocklist at a time. 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.