https://xxxxxx/v4/sns/friend_get_list?sdkappid=88888888&identifier=admin&usersig=xxx&random=99999999&contenttype=json
参数 | 说明 |
xxxxxx | SDKAppID 所在国家/地区对应的专属域名: 中国: console.tim.qq.com 新加坡: adminapisgp.im.qcloud.com 首尔: adminapikr.im.qcloud.com 法兰克福: adminapiger.im.qcloud.com 硅谷: adminapiusa.im.qcloud.com 雅加达: adminapiidn.im.qcloud.com |
v4/sns/friend_get_list | 请求接口 |
sdkappid | 创建应用时即时通信 IM 控制台分配的 SDKAppID |
identifier | |
usersig | |
random | 请输入随机的32位无符号整数,取值范围0 - 4294967295 |
contenttype | 请求格式固定值为 json |
{"From_Account":"UserID_1","To_Account":["UserID_2"],"TagList":["Tag_Profile_Custom_Test","Tag_Profile_IM_Image","Tag_Profile_IM_Nick","Tag_SNS_Custom_Test","Tag_SNS_IM_Remark","Tag_SNS_IM_Group"]}
{"From_Account":"UserID_1","To_Account":["UserID_2","UserID_3","UserID_4"],"TagList":["Tag_Profile_Custom_Test","Tag_Profile_IM_Image","Tag_Profile_IM_Nick","Tag_SNS_Custom_Test","Tag_SNS_IM_Remark","Tag_SNS_IM_Group"]}
{"InfoItem": [{"To_Account": "UserID_2","SnsProfileItem": [{"Tag": "Tag_SNS_IM_Remark","Value": "remark_2"},{"Tag": "Tag_SNS_IM_Group","Value": ["group1","group2"]},{"Tag": "Tag_Profile_IM_Nick","Value": "nick_2"},{"Tag": "Tag_SNS_Custom_Test","Value": "custom_sns_2"},{"Tag": "Tag_Profile_Custom_Test","Value": "custom_profile_2"}],"ResultCode": 0,"ResultInfo": ""}],"ActionStatus": "OK","ErrorCode": 0,"ErrorInfo": "","ErrorDisplay": ""}
{"InfoItem": [{"To_Account": "UserID_2","SnsProfileItem": [{"Tag": "Tag_SNS_IM_Remark","Value": "remark_2"},{"Tag": "Tag_SNS_IM_Group","Value": ["group1","group2"]},{"Tag": "Tag_Profile_IM_Nick","Value": "nick_2"},{"Tag": "Tag_SNS_Custom_Test","Value": "custom_sns_2"},{"Tag": "Tag_Profile_Custom_Test","Value": "custom_profile_2"}],"ResultCode": 0,"ResultInfo": ""},{"To_Account": "UserID_3","SnsProfileItem": [{"Tag": "Tag_SNS_IM_Remark","Value": "remark_3"},{"Tag": "Tag_Profile_IM_Nick","Value": "nick_3"},{"Tag": "Tag_Profile_Custom_Test","Value": "custom_profile_3"}],"ResultCode": 0,"ResultInfo": ""},{"To_Account": "UserID_4","ResultCode": 30001,"ResultInfo": "Err_SNS_FriendGetList_Friend_Not_Exist"}],"Fail_Account": ["UserID_4"],"ActionStatus": "OK","ErrorCode": 0,"ErrorInfo": "","ErrorDisplay": ""}
字段 | 类型 | 说明 |
InfoItem | Array | 好友对象数组,每一个好友对象都包含一个 To_Account 字段和一个 SnsProfileItem 数组 |
To_Account | String | 好友的 UserID |
SnsProfileItem | Array | 保存好友数据的数组,数组每一个元素都包含一个 Tag 字段和一个 Value 字段 |
Tag | String | 字段的名称 |
Value | String/Integer/Array | 字段的值 |
ResultCode | Integer | To_Account 的处理结果,0表示成功,非0表示失败,非0取值的详细描述请参见 错误码说明 |
ResultInfo | String | To_Account 的错误描述信息,成功时该字段为空 |
Fail_Account | Array | 返回处理失败的 UserID 列表,仅当存在失败用户时才返回该字段 |
ActionStatus | String | 请求处理的结果,OK 表示处理成功,FAIL 表示失败 |
ErrorCode | Integer | |
ErrorInfo | String | 详细错误信息 |
ErrorDisplay | String | 详细的客户端展示信息 |
错误码 | 描述 |
30001 | 请求参数错误,请根据错误描述检查请求参数 |
30003 | 请求的用户账号不存在 |
30004 | 请求需要 App 管理员权限 |
30006 | 服务器内部错误,请重试 |
30007 | 网络超时,请稍后重试 |
本页内容是否解决了您的问题?