主要使用场景:
获取接口访问凭证:accessToken
url | https://opengate.huijiaoyun.com/openapi/friendship/friendship?accessToken=****** |
请求方式 | GET |
格式 | json |
是否需要鉴权 | 是 |
请求数限制 | 否 |
接口方向 | 第三方应用>开放平台 |
序号 | 字段名 | 约束 | 位置 | 类型 | 长度 | 说明 |
---|---|---|---|---|---|---|
1 |
userid |
必选 |
Body(json) |
string |
- |
被查询的用户id |
2 |
num |
可选 |
Body(json) |
string |
- |
查询的数量,默认12 |
3 |
page |
可选 |
Body(json) |
string |
- |
被查询的页码(默认为1) |
4 |
usertype |
必选 |
Body(json) |
string |
- |
被查询的用户类型,0学生,1老师,2家长 |
序号 | 字段名 | 约束 | 类型 | 长度 | 说明 |
---|---|---|---|---|---|
1 |
code |
可选 |
string |
- |
返回状态 |
2 |
message |
可选 |
string |
- |
返回消息 |
3 |
page |
可选 |
string |
- |
返回下一页页码 |
4 |
data |
可选 |
string |
- |
返回数据 |
4.1 |
username |
可选 |
string |
- |
用户昵称 |
4.2 |
personid |
可选 |
string |
- |
用户id |
4.3 |
usertype |
可选 |
int |
- |
用户类型 |
4.4 |
usertype_desc |
可选 |
string |
- |
用户类型描述 |
4.5 |
url |
可选 |
string |
- |
个人主页地址 |
4.6 |
orgname |
可选 |
string |
- |
机构名称 |
4.7 |
orgid |
可选 |
string |
- |
机构id |
4.8 |
platformCode |
可选 |
string |
- |
平台码 |
请求报文: http://opengate.t.huijiaoyun.com/openapi/friendship/friendship?accessToken=******&userid=d7780bb644aa4c8a9b8f003ee0ca9aa5&usertype=1 应答报文: { "code": "000000", "message": "成功", "data": [ { "username": "肖川一", "personid": "0134c569f29f4bf78e2ba6e58b422890", "usertype": "1", "usertype_desc": "老师", "url": "index.php?r=space/person/index&sid=0134c569f29f4bf78e2ba6e58b422890", "platformCode": "420100", "orgname": "武汉大学第一附属小学", "orgid": "cbaa19e76e524c48a0cc10173205137f" }, { "username": "张海雪", "personid": "F259F9A5AC957692E04010AC73D40970", "usertype": "1", "usertype_desc": "老师", "url": "index.php?r=space/person/index&sid=F259F9A5AC957692E04010AC73D40970", "platformCode": "420105", "orgname": "武汉市翠微中学", "orgid": "5309cdb1fd6646d0807fd22cac7cbd25" }, { "username": "滕老师", "personid": "eab92753997b41d49032fa104b78c6a6", "usertype": "1", "usertype_desc": "老师", "url": "index.php?r=space/person/index&sid=eab92753997b41d49032fa104b78c6a6", "platformCode": "420100", "orgname": "武汉大学第一附属小学", "orgid": "cbaa19e76e524c48a0cc10173205137f" }, { "username": "李洪绸", "personid": "F259F9A705C57692E04010AC73D40970", "usertype": "1", "usertype_desc": "老师", "url": "index.php?r=space/person/index&sid=F259F9A705C57692E04010AC73D40970", "platformCode": "420100", "orgname": "武汉东湖高新区关南中学", "orgid": "F6C68AAFA413437CE040007F01001D3D" }, { "username": "白老师", "personid": "3e23bfb47dde4d16aebb0df38af15f58", "usertype": "1", "usertype_desc": "老师", "url": "index.php?r=space/perso
序号 | 字段名 | 约束 | 类型 | 长度 | 说明 |
---|---|---|---|---|---|
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 |
消息体的关键字对应的值 |