全能消息推送Bark(APP)

推送API文档(支持离线推送)

个人推送
频道(多人)推送

POST接口地址(表单格式)

POST

参数说明(表单格式:Content-Type: multipart/form-data)

参数 是否必须 说明
title 推送标题
msg 推送内容
url 可选 点击通知跳转的链接
token 要接收消息的客户端注册的token
issecure 固定值:0
sender 可选 发送者,默认:匿名消息,会在【接收消息】列表中显示

示例格式

POST HTTP/1.1 Content-Type: multipart/form-data title=推送标题&msg=推送内容&url=可选跳转链接&token=接收端的Token&issecure=0&sender=发送者 返回值: 成功 { "code": "80000000", "msg": "Success" }

POST接口地址(JSON格式)

POST

参数说明(JSON格式:Content-Type: application/json)

参数 是否必须 说明
title 推送标题
msg 推送内容
url 可选 点击通知跳转的链接
token 要接收消息的客户端注册的token
issecure 固定值:0
sender 可选 发送者,默认:匿名消息,会在【接收消息】列表中显示

示例格式

POST HTTP/1.1 Content-Type: application/json { "title": "推送标题", "msg": "推送内容", "url": "可选跳转链接", "token": "接收端Token", "issecure": 0, "sender": "发送者" } 返回值: 成功 { "code": "80000000", "msg": "Success" }

GET接口地址

GET

参数说明

参数 是否必须 说明
title 推送标题(需URL编码)
msg 推送内容(需URL编码)
url 可选 点击通知跳转的链接(需URL编码)
token 要接收消息的客户端注册的token(需URL编码)
issecure 固定值:0
sender 可选 发送者,默认:匿名消息,会在【接收消息】列表中显示(需URL编码)

示例格式

GET title=推送标题&msg=推送内容&url=可选跳转链接&token=接收端的Token&issecure=0&sender=发送者 返回值: 成功 { "code": "80000000", "msg": "Success" }

错误代码对照表

code:0 发送失败,网络原因或无效数据 code:300 请求过于频繁,普通用户1小时内最多接收10次消息 code:400 接收消息对象当天次数已用完

POST接口地址(向关注频道的人推送):

POST

参数说明(表单格式:Content-Type: multipart/form-data)

参数 是否必须 说明
title 推送标题
msg 推送内容
url 可选 点击通知跳转的链接
token 频道创建人的token
channel_id 频道的channelID,可在我的频道中查看

示例格式

POST HTTP/1.1 Content-Type: multipart/form-data title=推送标题&msg=推送内容&url=可选跳转链接&token=频道创建人的Token&channel_id=1 返回值: 成功 { "code": "80000000", "msg": "Success" }

错误代码对照表

code:0 发送失败,网络原因或无效数据 code:100 每个频道每15分钟只能发送一次推送