查询公共账号列表
使用场景:学校或教育局查询公共账号列表
权限说明
权限项 | 说明 | 备注 |
---|---|---|
应用是否需要申请白名单 | 不需要 | |
用户凭证 | 不支持 | |
机构凭证 | 支持 | - |
请求方式: GET(HTTPS)
请求地址:https://jz.hasmartedu.com/oapi/public_account/list
请求参数:
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
access_token | string | 是 | 接口调用凭证 |
page_index | int32 | 否 | 第几页 |
page_size | int32 | 否 | 每页数量 |
返回参数:
参数 | 类型 | 说明 |
---|---|---|
errcode | 返回码,0为正常 | |
errmsg | 对返回码的文本描述内容 | |
accounts | 账号列表 | |
accounts.userid | string | 用户id |
accounts.nickname | string | 用户名称 |
accounts.account | string | 登录账号 |
accounts.desc | string | 账号描述 |
accounts.departments | []object | 部门列表 |
accounts.departments.department_id | int32 | 部门id |
accounts.departments.department_name | string | 部门名称 |
accounts.departments.title_id | int32 | 职务id |
accounts.departments.title_name | string | 职务名称 |
请求示例:
GET https://jz.hasmartedu.com/oapi/public_account/list?access_token=ACCESS_TOKEN&page_index=1&page_size=30
返回结果:
{
"errmsg": "ok",
"errcode": 0,
"total": 1,
"accounts": [
{
"userid": "3733083368",
"nickname": "测试6",
"account": "testaccount6",
"departments": [
{
"department_id": 6645258,
"department_name": "普通部门",
"title_id": 615995,
"title_name": "主任"
}
],
"desc": "测试描述"
}
]
}
查询公共账号详情
使用场景:学校或教育局查询公共账号详情
权限说明
权限项 | 说明 | 备注 |
---|---|---|
应用是否需要申请白名单 | 不需要 | |
用户凭证 | 不支持 | |
机构凭证 | 支持 | - |
请求方式: GET(HTTPS)
请求地址:https://jz.hasmartedu.com/oapi/public_account/get
请求参数:
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
access_token | string | 是 | 接口调用凭证 |
userid | string | 是 | 用户id |
返回参数:
参数 | 类型 | 说明 |
---|---|---|
errcode | 返回码,0为正常 | |
errmsg | 对返回码的文本描述内容 | |
userid | string | 用户id |
nickname | string | 用户名称 |
account | string | 登录账号 |
phone | string | 手机号,已脱敏 |
desc | string | 账号描述 |
departments | []object | 部门列表 |
departments.department_id | int32 | 部门id |
departments.department_name | string | 部门名称 |
departments.title_id | int32 | 职务id |
departments.title_name | string | 职务名称 |
请求示例:
GET https://jz.hasmartedu.com/oapi/public_account/get?access_token=ACCESS_TOKEN&userid=USERID
返回结果:
{
"errmsg": "ok",
"errcode": 0,
"userid": "3733083368",
"nickname": "测试6",
"account": "testaccount6",
"departments": [
{
"department_id": 6645258,
"department_name": "普通部门",
"title_id": 615995,
"title_name": "主任"
}
],
"phone": "173****1234",
"desc": "测试描述"
}
添加公共账号
使用场景:学校或教育局添加公共账号
权限说明
权限项 | 说明 | 备注 |
---|---|---|
应用是否需要申请白名单 | 需要 | |
用户凭证 | 不支持 | |
机构凭证 | 支持 | - |
请求方式: POST(HTTPS)
请求地址:https://jz.hasmartedu.com/oapi/public_account/add
请求参数:
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
access_token | string | 是 | 接口调用凭证 |
nickname | string | 是 | 用户名称 |
password | string | 是 | 加密后的密码(参考附录参数加解密说明 里开放接口参数加解密章节) |
account | string | 是 | 登录账号 |
desc | string | 否 | 账号描述 |
departments | []object | 是 | 部门列表 |
departments.department_id | int32 | 是 | 部门id |
departments.title_id | int32 | 是 | 职务id |
返回参数:
参数 | 类型 | 说明 |
---|---|---|
errcode | 返回码,0为正常 | |
errmsg | 对返回码的文本描述内容 | |
userid | string | 用户id |
请求示例:
POST https://jz.hasmartedu.com/oapi/public_account/add?access_token=ACCESS_TOKEN
{
"nickname": "测试7",
"password": "5578f3bad95c705af30984dbdf70a275",
"account": "testaccount7",
"desc": "测试描述",
"departments": [
{
"department_id": 6645258,
"title_id": 615995
}
]
}
返回结果:
{
"errmsg": "ok",
"errcode": 0,
"userid": "3733083368"
}
修改公共账号
使用场景:学校或教育局修改公共账号
权限说明
权限项 | 说明 | 备注 |
---|---|---|
应用是否需要申请白名单 | 需要 | |
用户凭证 | 不支持 | |
机构凭证 | 支持 | - |
请求方式: POST(HTTPS)
请求地址:https://jz.hasmartedu.com/oapi/public_account/update
请求参数:
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
access_token | string | 是 | 接口调用凭证 |
userid | string | 是 | 用户id |
nickname | string | 是 | 用户名称 |
account | string | 是 | 登录账号 |
phone | string | 否 | 手机号 |
desc | string | 否 | 账号描述 |
departments | []object | 否 | 部门列表 |
departments.department_id | int32 | 否 | 部门id |
departments.title_id | int32 | 否 | 职务id |
返回参数:
参数 | 类型 | 说明 |
---|---|---|
errcode | 返回码,0为正常 | |
errmsg | 对返回码的文本描述内容 |
请求示例:
POST https://jz.hasmartedu.com/oapi/public_account/update?access_token=ACCESS_TOKEN
{
"userid": "3733084143",
"nickname": "测试7",
"account": "testaccount7",
"departments": [
{
"department_id": 6645258,
"title_id": 615995
}
],
"phone": "17312345678",
"desc": "测试描述"
}
返回结果:
{
"errmsg": "ok",
"errcode": 0
}
删除公共账号
使用场景:学校或教育局删除公共账号
权限说明
权限项 | 说明 | 备注 |
---|---|---|
应用是否需要申请白名单 | 需要 | |
用户凭证 | 不支持 | |
机构凭证 | 支持 | - |
请求方式: POST(HTTPS)
请求地址:https://jz.hasmartedu.com/oapi/public_account/delete
请求参数:
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
access_token | string | 是 | 接口调用凭证 |
userid | string | 是 | 用户id |
返回参数:
参数 | 类型 | 说明 |
---|---|---|
errcode | 返回码,0为正常 | |
errmsg | 对返回码的文本描述内容 |
请求示例:
POST https://jz.hasmartedu.com/oapi/public_account/delete?access_token=ACCESS_TOKEN
{
"userid": "3733084143"
}
返回结果:
{
"errmsg": "ok",
"errcode": 0
}
重置公共账号密码
使用场景:学校或教育局重置公共账号密码
权限说明
权限项 | 说明 | 备注 |
---|---|---|
应用是否需要申请白名单 | 需要 | |
用户凭证 | 不支持 | |
机构凭证 | 支持 | - |
请求方式: POST(HTTPS)
请求地址:https://jz.hasmartedu.com/oapi/public_account/reset
请求参数:
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
access_token | string | 是 | 接口调用凭证 |
userid | string | 是 | 用户id |
password | string | 是 | 加密后的密码(参考附录参数加解密说明 里开放接口参数加解密章节) |
reason | string | 是 | 重置原因 |
返回参数:
参数 | 类型 | 说明 |
---|---|---|
errcode | 返回码,0为正常 | |
errmsg | 对返回码的文本描述内容 |
请求示例:
POST https://jz.hasmartedu.com/oapi/public_account/reset?access_token=ACCESS_TOKEN
{
"userid": "3733084143",
"password": "5578f3bad95c705af30984dbdf70a275",
"reason": "测试重置"
}
返回结果:
{
"errmsg": "ok",
"errcode": 0
}