获取登录用户信息
POST
/cgi-bin/service/get_login_info
服务端API第三方应用开发智慧硬件开发
原文档地址:
https://open.work.weixin.qq.com/api/doc/90001/90143/91125
https://open.work.weixin.qq.com/api/doc/90002/90151/91158
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://qyapi.weixin.qq.com/cgi-bin/service/get_login_info?access_token=PROVIDER_ACCESS_TOKEN' \
--header 'Content-Type: application/json' \
--data-raw '{"auth_code":"xxxxx"}'
响应示例响应示例
{
"errcode": 0,
"errmsg": "ok",
"usertype": 1,
"user_info": {
"userid": "xxxx",
"open_userid": "xxx",
"name": "xxxx",
"avatar": "xxxx"
},
"corp_info": {
"corpid": "wxCorpId"
},
"agent": [
{
"agentid": 0,
"auth_type": 1
},
{
"agentid": 1,
"auth_type": 1
},
{
"agentid": 2,
"auth_type": 1
}
],
"auth_info": {
"department": [
{
"id": 2,
"writable": true
}
]
}
}
请求参数
Query 参数
access_token
必需
示例值:
PROVIDER_ACCESS_TOKEN
Body 参数application/json