top
关闭

开发者登录

主要使用场景:

1、更新消息状态接口

提供给开放平台的开发者,批量对用户接收到的消息设置已读或未读

前置条件

获取接口访问凭证:accessToken

请求说明

url https://opengate.huijiaoyun.com/msgCenter/message/modMsgStatus
请求方式 post
格式 json
是否需要鉴权
请求数限制
接口方向 第三方应用>开放平台

参数说明

序号 字段名 约束 位置 类型 长度 说明

1

publisherId

必选

Body(json)

String

-

接收人教育云用户id,不为待审批消息时,必传

2

msgId

必选

Body(json)

JSON

-

应用消息id消息集合,最多50个

3

isRead

可选

Body(json)

String

-

已读未读状态:0未读,1已读;默认1

4

platformCode

可选

Body(json)

String

-

用户平台码

返回说明

序号 字段名 约束 类型 长度 说明

示例

							请求报文:
{
	"publisherId":"7b551a5f23c242838c04e0fb02196e51",
	"platformCode":"420100",
	"isRead":1, 
	"msgId":["3806","1312"]
}
应答报文:
{
"retCode": "000000",
"retDesc": "操作成功"
}
						

参数说明

请求参数消息体-文本类
序号 字段名 约束 类型 长度 说明

1

msgType

必选

String

10

消息类型,此时固定为:text

1.1

text

必选

Json

-

text消息体

1.1.1

content

必选

String

消息内容

示例

{
	"msgtype": "text",
	"text": {
		"content": "zhxy msg text test 12"
	}
}
											

参数说明

请求参数消息体-link类
序号 字段名 约束 类型 长度 说明

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"
	}
}
											

参数说明

请求参数消息体-oa类
序号 字段名 约束 类型 长度 说明

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

消息体的关键字对应的值