主要使用场景:
获取用户信息
获取接口访问凭证:accessToken
url | https://apis.shec.edu.cn/user/openapi/user/get-user-info?user_id=***&accessToken={{accessToken}} |
请求方式 | get |
是否需要鉴权 | 是 |
请求数限制 | 否 |
接口方向 | 第三方应用>开放平台 |
序号 | 字段名 | 约束 | 类型 | 长度 | 说明 |
---|
序号 | 字段名 | 约束 | 类型 | 长度 | 说明 |
---|
请求示例 https://api.hner.cn/user/openapi/user/get-user-info?user_id=***&accessToken={{accessToken}} 返回示例 { "code": "000000", "message": "请求成功", "result": { "user_id": "24f5728a-5ff8-11e9-a457-0200f7efd26a", "platform_code": "888888", "v_platform_code": "888888,420100", "name": "lm650730", "nick_name": "lm650730", "gender": "2", "birthdate": "0", "createtime": "1555385498", "updatetime": "1555385498", "status": "1", "province_code": "", "city_code": "", "area_code": "", "user_family": [], "user_org": [ { "org_id": "0086516a-5ffa-11e9-8d9d-0200f7413ea8", "top_org_id": "42675838-5ff8-11e9-b985-0200f7efd26a", "org_type": "4",//加入了学校的其中一个部门 "display_order": "0", "attr": [], "createtime": "1555394037", "updatetime": "1555394037", "org_name": "财务部二层", "top_org_name": "武汉小学" }, { "org_id": "0d1975a8-718c-11e9-9037-0200f7ae226a", "top_org_id": "0d1975a8-718c-11e9-9037-0200f7ae226a", "org_type": "1",//当前为机构 "display_order": "0", "attr": [], "createtime": "1557318193", "updatetime": "1557318193", "org_name": "武汉市教育局", "top_org_name": "武汉市教育局" }, { "org_id": "42675838-5ff8-11e9-b985-0200f7efd26a", "top_org_id": "42675838-5ff8-11e9-b985-0200f7efd26a", "org_type": "2",//当前为学校 "display_order": "0", "attr": [], "createtime": "1555385548", "updatetime": "1555385548", "org_name": "武汉小学", "top_org_name": "武汉小学" }, { "org_id": "bb6c8a0a-6025-11e9-9789-0200f707c8ba", "top_org_id": "42675838-5ff8-11e9-b985-0200f7efd26a", "org_type": "7",//当前为班级 "display_order": "0", "attr": [ "class_monitor_student":1,//当为班级学生时,识别是否为班级班长 "class_teacher_subject": [ { "subject_id": "SUB7",//当为班级教师时,学科id "subject_type": 1,//学科类型,1基础学科,2自定义学科 "school_period": 2//学科学段 }, { "subject_id": "SUB49", "subject_type": 1, "school_period": 2 } ], "class_header_teacher":1//当为班级教师时,识别是否为班主任 ], "createtime": "1555553403", "updatetime": "1555553403", "top_school_id": "339e6d64-6016-11e9-b89e-0200f74d872f", "org_name": "五年级2班", "top_org_name": "武汉小学", "top_school_name": "武汉小学武昌校区" } ], "user_top_org": [ { "org_id": "0d1975a8-718c-11e9-9037-0200f7ae226a", "top_org_id": "0d1975a8-718c-11e9-9037-0200f7ae226a", "org_type": "1",//加入了机构 "display_order": "1557318193", "name": "lm650730", "user_type": "4", "attr": [], "createtime": "1557318193", "updatetime": "1557318193", "org_name": "武汉市教育局", "top_org_name": "武汉市教育局" }, { "org_id": "42675838-5ff8-11e9-b985-0200f7efd26a", "top_org_id": "42675838-5ff8-11e9-b985-0200f7efd26a", "org_type": "2",//同时加入了学校 "display_order": "1555385548", "name": "夏冰888", "user_type": "1", "attr": [], "createtime": "1555385548", "updatetime": "1557453305", "org_name": "武汉小学", "top_org_name": "武汉小学" } ], "user_role": [ { "role_id": "26f15578-656f-11e9-b4c2-0200f7a4f10e", "parent_id": "2", "role_type": "2", "org_id": "d040453c-656d-11e9-bbe9-0200f7a4f10e", "top_org_id": "d040453c-656d-11e9-bbe9-0200f7a4f10e", "createtime": "1555986367", "updatetime": "1555986367", "display_order": "0", "_power": [ { "power_name":"sub_manager_department", "power_value":"["all"]", "role_id":"26f15578-656f-11e9-b4c2-0200f7a4f10e", "createtime": "1555986367", "updatetime": "1555986367", }, { "power_name":"sub_manager_app", "power_value":"["1", "4"]", "role_id":"26f15578-656f-11e9-b4c2-0200f7a4f10e", "createtime": "1555986367", "updatetime": "1555986367", }, { "power_name":"sub_manager_campus", "power_value":"["56DEB663D6091A6C4BD329E3696D52DE"]", "role_id":"26f15578-656f-11e9-b4c2-0200f7a4f10e", "createtime": "1555986367", "updatetime": "1555986367", } ] }, { "role_id": "6e0f54fe-600c-11e9-8492-0200f734321a", "parent_id": "3", "role_type": "2", "org_id": "fad2bf4c-5ff9-11e9-84b3-0200f7413ea8", "top_org_id": "42675838-5ff8-11e9-b985-0200f7efd26a", "createtime": "1555394211", "updatetime": "1555394211", "display_order": "0", "_power": [ ] }, { "role_id": "f9e4f920-600c-11e9-9d09-0200f734321a", "parent_id": "ba56b1f4-600c-11e9-a949-0200f734321a", "role_type": "2", "org_id": "42675838-5ff8-11e9-b985-0200f7efd26a", "top_org_id": "42675838-5ff8-11e9-b985-0200f7efd26a", "createtime": "1555394445", "updatetime": "1555395687", "display_order": "0", "_power": [] }, { "role_id": "b8f079f4-600b-11e9-a76c-0200f786b57b", "parent_id": "3", "role_type": "2", "org_id": "42675838-5ff8-11e9-b985-0200f7efd26a", "top_org_id": "42675838-5ff8-11e9-b985-0200f7efd26a", "createtime": "1555393907", "updatetime": "1557317605", "display_order": "0", "_power": [] }, { "role_id": "b0fa88ba-6a70-11e9-bf75-0200f734fe75", "parent_id": "2", "role_type": "2", "org_id": "42675838-5ff8-11e9-b985-0200f7efd26a", "top_org_id": "42675838-5ff8-11e9-b985-0200f7efd26a", "createtime": "1556536784", "updatetime": "1556536784", "display_order": "0", "_power": [ { "id": "b120af54-6a70-11e9-bf75-0200f734fe75", "role_id": "b0fa88ba-6a70-11e9-bf75-0200f734fe75", "power_name": "sub_manager_app", "power_value": "[\"all\"]", "createtime": "1556536784", "updatetime": "1556536784" }, { "id": "b11d9986-6a70-11e9-bf75-0200f734fe75", "role_id": "b0fa88ba-6a70-11e9-bf75-0200f734fe75", "power_name": "sub_manager_department", "power_value": "[\"all\"]", "createtime": "1556536784", "updatetime": "1556536784" } ] } ], "avatar": { "1": "", "2": "", "3": "" }, "last_top_org_id": "42675838-5ff8-11e9-b985-0200f7efd26a", "last_top_org_name": "武汉小学", "last_user_type": "1", "init_user_type": "1", "init_v_platform_code": "888880" } }
序号 | 字段名 | 约束 | 类型 | 长度 | 说明 |
---|---|---|---|---|---|
1 |
msgType |
必选 |
String |
10 |
消息类型,此时固定为:text |
1.1 |
text |
必选 |
Json |
- |
text消息体 |
1.1.1 |
content |
必选 |
String |
消息内容 |
{ "msgtype": "text", "text": { "content": "zhxy msg text test 12" } }
序号 | 字段名 | 约束 | 类型 | 长度 | 说明 |
---|---|---|---|---|---|
1 |
msgType |
必选 |
String |
10 |
消息类型,此时固定为:link |
2 |
link |
必选 |
Json |
- |
link消息体 |
2.1 |
pcUrl |
必选 |
String |
PC端消息点击链接地址 |
|
2.2 |
appUrl |
必选 |
String |
移动客户端点击消息时跳转到的H5地址 |
|
2.3 |
title |
必选 |
String |
消息标题 |
|
2.4 |
busiId |
必选 |
String |
对应业务的id |
|
2.5 |
content |
必选 |
String |
消息描述 |
|
2.6 |
picUrl |
必选 |
String |
图文消息的图片链接,支持JPG、PNG格式,较好的效果为大图640*320,小图80*80。如不填,在客户端不显示图片 |
{ "msgtype": "link", "link": { "pcUrl": "http://www.baidu.com", "appUrl": "http://www.baidu.com", "picUrl": "http://xxx.yyy.com/zzz.jpg", "content": "百度一下", "title": "百度", "busiId":"AQWER1234" } }
序号 | 字段名 | 约束 | 类型 | 长度 | 说明 |
---|---|---|---|---|---|
1 |
msgType |
必选 |
String |
10 |
消息类型,此时固定为:oa |
2 |
busiId |
必选 |
String |
- |
该条oa消息在业务系统对应的id |
3 |
pcUrl |
必选 |
String |
消息点击链接地址 |
|
4 |
appUrl |
必选 |
String |
移动客户端点击消息时跳转到的H5地址 |
|
5 |
oa |
必选 |
Json |
- |
oa类型消息体 |
5.1 |
head |
必选 |
Json |
255 |
消息头部Json |
5.1.1 |
text |
必选 |
String |
255 |
消息的头部标题 |
5.1.2 |
bgColor |
可选 |
String |
消息头部的背景颜色。长度限制为8个英文字符,其中前2为表示透明度,后6位表示颜色值。不要添加0x。默认值:FFCC0000 |
|
5.2 |
body |
可选 |
Json |
消息体 |
|
5.2.1 |
title |
可选 |
String |
消息体的标题 |
|
5.2.2 |
content |
可选 |
String |
消息体的正文 |
|
5.2.3 |
imageUrl |
可选 |
String |
消息体中的图片url |
|
5.2.4 |
fileCount |
可选 |
String |
自定义的附件数目。此数字仅供显示,不作验证 |
|
5.2.5 |
author |
可选 |
String |
自定义的作者名字 |
|
5.2.6 |
form |
可选 |
Json数组 |
消息体的表单,最多6个 |
|
5.2.7 |
key |
可选 |
String |
消息体的关键字 |
|
5.2.8 |
value |
可选 |
String |
消息体的关键字对应的值 |