# 获取授权方的账号基本信息
接口应在服务器端调用,详细说明参见服务端API。
# 接口说明
# 接口英文名
getAuthorizerInfo
# 功能描述
该 API 用于获取授权方的基本信息,包括头像、昵称、账号类型、认证类型、原始ID等信息。使用过程中如遇到问题,可在开放平台服务商专区发帖交流。
# 调用方式
# HTTPS 调用
POST https://api.weixin.qq.com/cgi-bin/component/api_get_authorizer_info?access_token=ACCESS_TOKEN
# 请求参数
属性 | 类型 | 必填 | 说明 |
---|---|---|---|
access_token | string | 是 | 第三方平台接口调用凭证component_access_token,该参数为 URL 参数,非 Body 参数。 |
component_appid | string | 是 | 第三方平台 appid |
authorizer_appid | string | 是 | 授权的公众号或者小程序的appid |
# 返回参数
属性 | 类型 | 说明 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
authorizer_info | object | 授权账号信息 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
authorization_info | object | 授权信息 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# 调用示例
示例说明: 公众号返回示例
# 请求数据示例
{
"component_appid": "appid_value" ,
"authorizer_appid": "auth_appid_value"
}
# 返回数据示例
{
"authorizer_info": {
"nick_name": "微信SDK Demo Special",
"head_img": "http://wx.qlogo.cn/mmopen/GPy",
"service_type_info": {
"id": 2
},
"verify_type_info": {
"id": 0
},
"user_name": "gh_eb5e3a772040",
"principal_name": "腾讯计算机系统有限公司",
"business_info": {
"open_store": 0,
"open_scan": 0,
"open_pay": 0,
"open_card": 0,
"open_shake": 0
},
"alias": "paytest01",
"qrcode_url": "URL",
},
"authorization_info": {
"authorizer_appid": "wxf8b4f85f3a794e77",
"func_info": [
{
"funcscope_category": {
"id": 1
}
},
{
"funcscope_category": {
"id": 2
}
}
]
}
}
示例说明: 小程序返回示例
# 请求数据示例
{
"component_appid": "appid_value" ,
"authorizer_appid": "auth_appid_value"
}
# 返回数据示例
{"authorizer_info":
{"nick_name":"找呀找呀找盲盒",
"head_img":"http:xxx",
"service_type_info":{"id":0},
"verify_type_info":{"id":-1},
"user_name":"gh_3dacad47dc6b",
"alias":"",
"qrcode_url":"http:xxx",
"business_info":{"open_pay":0,"open_shake":0,"open_scan":0,"open_card":0,"open_store":0},
"idc":1,"principal_name":"个人","signature":"欢迎小伙伴一起参与盲盒游戏,集齐9款鞋卡,可以兑换大奖!",
"MiniProgramInfo":{"network":{"RequestDomain":["https:xxx","https:xxxx","https:xxx"],"WsRequestDomain":[],"UploadDomain":[],"DownloadDomain":[],"BizDomain":[],"UDPDomain":[]},
"categories":[{"first":"工具","second":"效率"}],"visit_status":0}},
"authorization_info":{"authorizer_appid":"wxf24d2dfc1a974128",
"authorizer_refresh_token":"xxxxxx",
"func_info":[{"funcscope_category":{"id":17}},
{"funcscope_category":{"id":18}},
{"funcscope_category":{"id":19}},{"funcscope_category":{"id":25}},
{"funcscope_category":{"id":30}},
{"funcscope_category":{"id":31}},
{"funcscope_category":{"id":36}},{"funcscope_category":{"id":37}},{"funcscope_category":{"id":40}},
]}
}
# 错误码
错误码 | 错误码取值 | 解决方案 |
---|---|---|
-1 | system error | 系统繁忙,此时请开发者稍候再试 |
40001 | invalid credential access_token isinvalid or not latest | 获取 access_token 时 AppSecret 错误,或者 access_token 无效。请开发者认真比对 AppSecret 的正确性,或查看是否正在为恰当的公众号调用接口 |
40013 | invalid appid | 不合法的 AppID ,请开发者检查 AppID 的正确性,避免异常字符,注意大小写 |