6. 获取授权方的帐号基本信息

该 API 用于获取授权方的基本信息,包括头像、昵称、帐号类型、认证类型、微信号、原始ID 和二维码图片 URL。

需要特别记录授权方的帐号类型,在消息及事件推送时,对于不具备客服接口的公众号,需要在5秒内立即响应; 而若有客服接口,则可以选择暂时不响应,而选择后续通过客服接口来发送消息触达粉丝。

(1)公众号获取方法如下:

请求格式

POST https: //api.weixin.qq.com/cgi-bin/component/api_get_authorizer_info?component_access_token=xxxx

请求数据

{
  "component_appid": "appid_value",
  "authorizer_appid": "auth_appid_value"
}

请求参数说明

参数

说明

component_appid

第三方平台 appid

authorizer_appid

授权方 appid

返回结果

{
  "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": {
    "authorization_appid": "wxf8b4f85f3a794e77",
    "func_info": [
      {
        "funcscope_category": {
          "id": 1
        }
      },
      {
        "funcscope_category": {
          "id": 2
        }
      },
      {
        "funcscope_category": {
          "id": 3
        }
      }
    ]
  }
}

结果参数说明

(2)小程序获取方法如下

请求格式

POST https: //api.weixin.qq.com/cgi-bin/component/api_get_authorizer_info?component_access_token=xxxx

请求数据

{
  "component_appid": "appid_value",
  "authorizer_appid": "auth_appid_value"
}

请求参数说明

参数

说明

component_appid

第三方平台 appid

authorizer_appid

授权方 appid

返回结果

{
  "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
    },
    "qrcode_url": "URL",
    "signature": "时间的水缓缓流去",
    "MiniProgramInfo": {
      "network": {
        "RequestDomain": ["https://www.qq.com", "https://www.qq.com"],
        "WsRequestDomain": ["wss://www.qq.com", "wss://www.qq.com"],
        "UploadDomain": ["https://www.qq.com", "https://www.qq.com"],
        "DownloadDomain": ["https://www.qq.com", "https://www.qq.com"]
      },
      "categories": [
        {
          "first": "资讯",
          "second": "文娱"
        },
        {
          "first": "工具",
          "second": "天气"
        }
      ],
      "visit_status": 0
    }
  },
  "authorization_info": {
    "appid": "wxf8b4f85f3a794e77",
    "func_info": [
      {
        "funcscope_category": {
          "id": 17
        }
      },
      {
        "funcscope_category": {
          "id": 18
        }
      },
      {
        "funcscope_category": {
          "id": 19
        }
      }
    ]
  }
}

返回参数说明