获取永久授权码
说明: 注意每个机构的永久授权码不同,应用重装后需要重新获取永久授权码
请求方式:POST (HTTPS)
请求地址:https://oapi.epaas.qq.com/service/get_permanent_code?suite_access_token=SUITE_ACCESS_TOKEN
请求包体:
{
"auth_code": "auth_code_value"
}
参数说明:
参数 | 是否说明 | 说明 |
---|---|---|
auth_code | 是 | 临时授权码,会在授权成功时附加在redirect_uri中跳转回第三方服务商网站,或通过授权成功通知回调推送给服务商。参考:应用授权通知(安装) |
返回结果:
{
"errcode":0 ,
"errmsg":"ok" ,
"permanent_code": "xxxx",
"corpid":"234",
"agentid":123
}
参数说明:
参数 | 说明 |
---|---|
permanent_code | 永久授权码,用于获取 corp_access_token 和机构授权信息 |
corpid | 机构id |
agentid | 授权方应用id |
获取机构授权信息
请求方式:POST(HTTPS)
请求地址:https://oapi.epaas.qq.com/service/get_auth_info?suite_access_token=SUITE_ACCESS_TOKEN
请求包体:
{
"auth_corpid": "auth_corpid_value",
"permanent_code": "code_value"
}
参数说明:
参数 | 必须 | 说明 |
---|---|---|
auth_corpid | 是 | 授权方CorpId |
permanent_code | 是 | 永久授权码,通过 get_permanent_code 获取 |
返回结果:
{
"errcode":0 ,
"errmsg":"ok" ,
"auth_corp_info":
{
"corpid": "xxxx",
"corp_name": "name",
"province":"广东省",
"city":"深圳市",
"area":"南山区",
"name":"张三",
"userid":"10088"
}
}
参数说明:
参数 | 说明 |
---|---|
errcode | 返回码 |
errmsg | 对返回码的文本描述内容 |
auth_corp_info | 授权方机构信息 |
corpid | 机构id CorpId |
corp_name | 机构名称 |
province | 机构所属省 |
city | 机构所属市 |
area | 机构所属区 |
name | 创建人姓名 |
userid | 创建人用户id |