获取用户消息分组列表
对于未使用B2C App/H5的被集成方或者想自己处理消息展示的应用,可以由业务应用的服务端调用该接口来获取对应信息。
使用前请联系云创团队获取调用所需的app_key
和app_secret
。
请求
域名
测试环境 https://b2c-message-test.mypaas.com.cn
生产环境 https://b2c-message.mypaas.com.cn
uri
/api/v1/client/user/messages/
请求方法
GET
header参数
无
query参数
名称 | 类型 | 必填 | 说明 | 示例 |
---|---|---|---|---|
tenant_code | string | 是 | 租户code | agile |
token | string | 是 | 登录token | - |
group_id | int | 是 | 消息分组id | 1 |
lastest_create_unixtime | int | 否 | 最新创建unix时间,默认0 | 15253427470 |
oldest_create_unixtime | int | 否 | 最旧创建unix时间,默认0 | 15253427470 |
body参数
无
响应
响应json.data
名称 | 类型 | 说明 |
---|---|---|
data.*.message_id | string | 消息id |
data.*.title | string | 标题 |
data.*.type | int | 消息类型 |
data.*.description | string | 描述 |
data.*.content | string | 内容 |
data.*.action | string | 动作 |
data.*.create_unixtime | int | 创建时间 |
data.*.is_read | bool | 是否已读 |
oldest_create_unixtime | int | 当前集合最旧的create_unixtime |
lastest_create_unixtime | int | 当前集合最新的create_unixtime |
响应json的demo
{
"msg":"ok",
"data":{
"data":[
{
"message_id":133,
"title":"测试",
"type":0,
"description":"测试",
"content":"测试",
"action":"",
"create_unixtime":1525348619,
"is_read":false
},
{
"message_id":134,
"title":"测试",
"type":0,
"description":"测试",
"content":"测试",
"action":""
"create_unixtime":1525348633,
"is_read":false
}
],
"oldest_create_unixtime":1525348619,
"lastest_create_unixtime":1525348633
},
"code":200
}