https://xxxxxx/v4/sns/group_add?sdkappid=88888888&identifier=admin&usersig=xxx&random=99999999&contenttype=json
Parameter | Description |
xxxxxx | Domain name corresponding to the country/region where your SDKAppID is located. China: console.tim.qq.com Singapore: adminapisgp.im.qcloud.com Seoul: adminapikr.im.qcloud.com Frankfurt: adminapiger.im.qcloud.com Silicon Valley: adminapiusa.im.qcloud.com |
v4/sns/group_add | Request API |
sdkappid | SDKAppID assigned by the Chat console when an app is created |
identifier | |
usersig | |
random | A random 32-bit unsigned integer ranging from 0 to 4294967295. |
contenttype | Request format, which should always be json . |
{"From_Account":"id","GroupName":["group1","group2","group3"]}
{"From_Account":"id","GroupName":["group1","group2","group3"],"To_Account":["id1","id2","id3"]}
Field | Type | Required | Description |
From_Account | String | Yes | UserID for which a new friend list needs to be added. |
GroupName | Array | Yes | List of new group lists. Note: Since the maximum number of groups is 32, a single request must not exceed 32 groups. |
To_Account | Array | No | UserID list of friends that need to be added to the new group list; a single request must not exceed 1000 friends. |
{"CurrentSequence": 2,"ActionStatus": "OK","ErrorCode": 0,"ErrorInfo": "","ErrorDisplay": ""}
{"ResultItem":[{"To_Account": "id1","ResultCode": 0,"ResultInfo": ""},{"To_Account": "id2","ResultCode": 32216,"ResultInfo": "Err_SNS_GroupAdd_ToTinyId_Not_Friend"},{"To_Account": "id3","ResultCode": 30002,"ResultInfo": "ERR_SDKAPPID_ILLEGAL"}],"Fail_Account":["id2","id3"],"CurrentSequence": 3,"ActionStatus": "OK","ErrorCode": 0,"ErrorInfo": "","ErrorDisplay": ""}
Field | Type | Description |
ResultItem | Array | Result object array for adding a friend to a new friend list. |
To_Account | String | UserID of the friend to be added to the new friend list. |
ResultCode | Integer | Result of To_Account . 0 : Successful. Other values: Failed. For details on non-zero results, see Error Codes. |
ResultInfo | String | Error description of To_Account . This field is empty if the request is successful. |
Fail_Account | Array | List of users whose processing failed. This field is only returned when at least one user fails. |
CurrentSequence | Integer | Current sequence of the lists. |
ActionStatus | String | Request result. OK : Successful; FAIL : Failed |
ErrorCode | Integer | |
ErrorInfo | String | Detailed error information. |
ErrorDisplay | String | Detailed information displayed on the client |
ResultCode
, ResultInfo
, ErrorCode
, and ErrorInfo
.
For public error codes (60000 to 79999), see Error Codes.
The following table describes the error codes specific to this API:Error Code | Description |
30001 | Incorrect request parameter. Check your request according to the error description. |
30002 | The SDKAppID does not match. |
30003 | The requested account does not exist. |
30004 | The request requires app admin permissions. |
30006 | Internal server error. Try again. |
30007 | Network timeout. Try again later. |
30008 | A write conflict occurred due to concurrent write operations. You are advised to use bulk processing. |
30011 | The maximum number of friend lists has been reached. |
문제 해결에 도움이 되었나요?