文档中心 > API类目 > yunos推送服务api

yunos.service.cmns.coa.message.get (消息详情查询)

第三方应用开发者调用此接口查询消息详情,只能查询此appKey发的消息

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
mid Number 可选 586800001 消息id

响应参数

名称 类型 示例值 描述
data MessageDetailResult MessageDetailResult 消息内容
  • └ ack_cnt
  • Number
  • 1
  • 消息到达数
  • └ action
  • String
  • lifecard.card
  • 消息侦听通道
  • └ app_key
  • String
  • 1234234
  • appKey
  • └ app_name
  • String
  • lifecard.card
  • 应用名称
  • └ audit
  • Number
  • 1
  • 消息审核状态
  • └ desc
  • String
  • desc
  • 通知消息内容
  • └ exipired_time
  • Date
  • 2017-12-12 12:12:12
  • 消息失效时间
  • └ gmt_create_time
  • Date
  • 2017-12-12 12:12:12
  • 消息创建时间
  • └ id
  • Number
  • 586800001
  • 消息id
  • └ parameter
  • String
  • {}
  • 消息参数
  • └ predict_send_cnt
  • Number
  • 1
  • 预计发送数
  • └ priority
  • Number
  • 1
  • 消息优先级
  • └ receiver
  • String
  • {\"range\":\"special\",\"terms\":[{\"name\":\"uuid\",\"value\":[\"11111111111111111111111111111111\"]}]}
  • 消息接收者json string
  • └ send_status
  • Number
  • 0,1,2
  • 消息发送状态 0:发送中,1:发送完成,2:发送过期
  • └ title
  • String
  • title
  • 通知消息标题
  • └ type
  • Number
  • 1
  • 消息类型,1为透传,2为通知
  • └ uri
  • String
  • page://xx.yunos.com/test
  • 消息uri,yunos4.x系统专用
message String SUCCESS 接口查询出错提示信息
status Number 200 200表示查询成功

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
YunosServiceCmnsCoaMessageGetRequest req = new YunosServiceCmnsCoaMessageGetRequest();
req.setMid(586800001L);
YunosServiceCmnsCoaMessageGetResponse rsp = client.execute(req);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<yunos_service_cmns_coa_message_get_response>
    <data>
        <ack_cnt>1</ack_cnt>
        <action>lifecard.card</action>
        <app_key>1234234</app_key>
        <app_name>lifecard.card</app_name>
        <audit>1</audit>
        <desc>desc</desc>
        <exipired_time>2017-12-12 12:12:12</exipired_time>
        <gmt_create_time>2017-12-12 12:12:12</gmt_create_time>
        <id>586800001</id>
        <parameter>{}</parameter>
        <predict_send_cnt>1</predict_send_cnt>
        <priority>1</priority>
        <receiver>{\&quot;range\&quot;:\&quot;special\&quot;,\&quot;terms\&quot;:[{\&quot;name\&quot;:\&quot;uuid\&quot;,\&quot;value\&quot;:[\&quot;11111111111111111111111111111111\&quot;]}]}</receiver>
        <send_status>0,1,2</send_status>
        <title>title</title>
        <type>1</type>
        <uri>page://xx.yunos.com/test</uri>
    </data>
    <message>SUCCESS</message>
    <status>200</status>
</yunos_service_cmns_coa_message_get_response>

异常示例

  • XML示例
  • JSON示例
<error_response>
    <code>50</code>
    <msg>Remote service error</msg>
    <sub_code>isv.invalid-parameter</sub_code>
    <sub_msg>非法参数</sub_msg>
</error_response>

错误码解释

错误码 错误描述 解决方案

API工具

如何获得此API

FAQ

返回
顶部