获取管理员登录授权码¶
功能说明¶
- 企业超级管理员:无需指定userid
- 个人管理员:需指定员工唯一标识userid获取一次性登录授权码(员工需事前添加到关爱通平台)
接口地址¶
- 测试环境: https://openapi.guanaitong.tech/sso/enterprise/getAuthCode
- 生产环境: https://openapi.guanaitong.com/sso/enterprise/getAuthCode
参数说明¶
-
公有参数
发送请求是必须传入公共参数,详见公共参数
-
私有参数
| 参数名称 | 是否必须 | 参数类型 | 长度限制 | 描述 |
|---|---|---|---|---|
| enterprise_code | 是 | string | [1,50] | 企业编码 |
| userid | 否 | string | [1,20] | 超级管理员不需要指定,个人管理员必须指定员工唯一标识 |
| third_type | 否 | int | 对接类型:不填的话默认为5标准对接,4代表定制对接,1代表企业微信,2代表钉钉,3代表飞书 |
请求示例¶
POST /sso/enterprise/getAuthCode HTTP/1.1
Host: openapi.guanaitong.tech
Content-Type: application/x-www-form-urlencoded
Cache-Control: no-cache
userid=alaskwang&enterprise_id=lighthouse&
access_token=efab39effde9a19f08ba9717cd22a6f9&
timestamp=1499933447&sign=630fc59c41c700cb89fc93f27f867c04cc14e414
返回参数说明¶
| 参数名称 | 描述 |
|---|---|
| code | 返回码。详见错误代码。 |
| msg | 如果错误,返回错误信息。 |
| data | 如果没有错误,返回一次性授权码40位 |