https://xxxxxx/v4/profile/portrait_get?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/profile/portrait_get | 请求接口 |
sdkappid | 创建应用时即时通信 IM 控制台分配的 SDKAppID |
identifier | |
usersig | |
random | 请输入随机的32位无符号整数,取值范围0 - 4294967295 |
contenttype | 请求格式固定值为 json |
{"To_Account":["id1"],"TagList":["Tag_Profile_IM_Nick"]}
{"To_Account":["id1"],"TagList":["Tag_Profile_IM_Nick","Tag_Profile_IM_AllowType","Tag_Profile_IM_SelfSignature","Tag_Profile_Custom_Test"]}
{"To_Account":["id1","id2","id3"],"TagList":["Tag_Profile_IM_Nick"]}
{"To_Account":["id1","id2","id3","id4"],"TagList":["Tag_Profile_IM_Nick","Tag_Profile_IM_AllowType","Tag_Profile_IM_SelfSignature","Tag_Profile_Custom_Test"]}
{"UserProfileItem":[{"To_Account":"id1","ProfileItem":[{"Tag":"Tag_Profile_IM_Nick","Value":"NickNameTest1"}],"ResultCode":0,"ResultInfo":""}],"ActionStatus":"OK","ErrorCode":0,"ErrorInfo":"","ErrorDisplay":""}
{"UserProfileItem":[{"To_Account":"id1","ProfileItem":[{"Tag":"Tag_Profile_IM_Nick","Value":"NickNameTest1"},{"Tag":"Tag_Profile_IM_AllowType","Value":"AllowType_Type_NeedConfirm"},{"Tag":"Tag_Profile_IM_SelfSignature","Value":"I'm Test1"},{"Tag":"Tag_Profile_Custom_Test","Value":"Custom Data1"}],"ResultCode":0,"ResultInfo":""}],"ActionStatus":"OK","ErrorCode":0,"ErrorInfo":"","ErrorDisplay":""}
{"UserProfileItem":[{"To_Account":"id1","ProfileItem":[{"Tag":"Tag_Profile_IM_Nick","Value":"NickNameTest1"}],"ResultCode":0,"ResultInfo":""},{"To_Account":"id2","ProfileItem":[{"Tag":"Tag_Profile_IM_Nick","Value":"NickNameTest2"}],"ResultCode":0,"ResultInfo":""},{"To_Account":"id3","ProfileItem":[{"Tag":"Tag_Profile_IM_Nick","Value":"NickNameTest3"}],"ResultCode":0,"ResultInfo":""}],"ActionStatus":"OK","ErrorCode":0,"ErrorInfo":"","ErrorDisplay":""}
{"UserProfileItem":[{"To_Account":"id1","ProfileItem":[{"Tag":"Tag_Profile_IM_Nick","Value":"NickNameTest1"},{"Tag":"Tag_Profile_IM_AllowType","Value":"AllowType_Type_NeedConfirm"},{"Tag":"Tag_Profile_IM_SelfSignature","Value":"I'm Test1"},{"Tag":"Tag_Profile_Custom_Test","Value":"Custom Data1"}],"ResultCode":0,"ResultInfo":""},{"To_Account":"id2","ProfileItem":[{"Tag":"Tag_Profile_IM_Nick","Value":"NickNameTest2"},{"Tag":"Tag_Profile_IM_AllowType","Value":"AllowType_Type_DenyAny"},{"Tag":"Tag_Profile_IM_SelfSignature","Value":"I'm Test2"},{"Tag":"Tag_Profile_Custom_Test","Value":"Custom Data2"}],"ResultCode":0,"ResultInfo":""},{"To_Account":"id3","ProfileItem":[{"Tag":"Tag_Profile_IM_Nick","Value":"NickNameTest3"},{"Tag":"Tag_Profile_IM_AllowType","Value":"AllowType_Type_AllowAny"},{"Tag":"Tag_Profile_IM_SelfSignature","Value":"I'm Test3"},{"Tag":"Tag_Profile_Custom_Test","Value":"Custom Data3"}],"ResultCode":0,"ResultInfo":""},{"To_Account":"id4","ResultCode":40006,"ResultInfo":"Err_Profile_PortraitGet_Read_Custom_Data_Fail"}],"Fail_Account":["id4"],"ActionStatus":"OK","ErrorCode":0,"ErrorInfo":"","ErrorDisplay":""}
字段 | 类型 | 说明 |
UserProfileItem | Array | 返回的用户资料结构化信息 |
To_Account | String | 返回的用户的 UserID |
ProfileItem | Array | 返回的用户的资料对象数组,数组中每一个对象都包含了 Tag 和 Value |
Tag | String | 返回的资料对象的名称: 标配资料字段,详情请参见 标配资料字段 自定义资料字段,详情请参见 自定义资料字段 |
Value | uint64_t/string/bytes | 拉取的资料对象的值,详情可参见 资料字段 |
ResultCode | Integer | To_Account 的处理结果,0表示成功,非0表示失败 |
ResultInfo | String | To_Account 的错误描述信息,成功时该字段为空 |
Fail_Account | Array | 返回处理失败的用户列表,仅当存在失败用户时才返回该字段 |
ActionStatus | String | 请求处理的结果,“OK” 表示处理成功,“FAIL” 表示失败 |
ErrorCode | Integer | 错误码,0表示成功,非0表示失败 |
ErrorInfo | String | 详细错误信息 |
ErrorDisplay | String | 详细的客户端展示信息 |
错误码 | 描述 |
40001 | 请求参数错误,请根据错误描述检查请求参数 |
40002 | 请求参数错误,没有指定 To_Account |
40003 | 请求的用户账号不存在 |
40004 | 请求需要 App 管理员权限 |
40006 | 服务器内部错误,请稍后重试 |
40007 | 没有资料字段的读权限 |
40009 | 资料字段的 Tag 不存在 |
本页内容是否解决了您的问题?