文档中心 > API类目 > 智慧园区API

alibaba.campus.mc.messagebox.querymessage (获取某个类别下的消息)

获取某个类别下的消息

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
receiver Number 可选 1 接受者ID
type String 可选 XXX 消息类型
time_stamp Number 可选 12312313 时间戳
page_size Number 可选 20 页面大小
source String 可选 iwork-mall 调用者

响应参数

名称 类型 示例值 描述
result CollectionResult {} 响应结果
  • contents
  • Content []
  • []
  • 具体内容
  • └ target_mobile_url
  • String
  • xx.xx.com/xx
  • 移动端跳转URL
  • └ type
  • String
  • XXX
  • 消息类型
  • └ resource_id
  • String
  • 1
  • 消息产生资源id 举例:A评论了B的帖子,给B发了一条消息;resourceId=B的帖子id
  • └ company_id
  • Number
  • 1
  • 公司ID
  • └ status
  • String
  • 1
  • 消息状态
  • └ action
  • String
  • 1
  • 消息动作ID
  • └ event_time_millis
  • Number
  • 1232131
  • 消息事件日期(毫秒展示)
  • └ content
  • String
  • 123
  • 消息内容
  • └ title
  • String
  • 111
  • 消息标题
  • └ receiver
  • Number
  • 1
  • 消息接收者(员工ID)
  • └ sender
  • Number
  • 1
  • 消息发送者
  • └ id
  • Number
  • 1
  • id
  • └ total_count
  • Number
  • 123
  • 总数据
  • └ request_id
  • String
  • 1
  • 请求ID.TOP自带,不用关注
  • └ error_code
  • String
  • 200
  • 错误码
  • └ error_msg
  • String
  • ok
  • 错误码信息
  • └ success
  • Boolean
  • true
  • 是否请求成功
  • └ error_level
  • String
  • 0
  • 错误级别
  • └ error_ext_info
  • String
  • {"errormsg":"ok"}
  • 错误详情

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaCampusMcMessageboxQuerymessageRequest req = new AlibabaCampusMcMessageboxQuerymessageRequest();
req.setReceiver(1L);
req.setType("XXX");
req.setTimeStamp(12312313L);
req.setPageSize(20L);
req.setSource("iwork-mall");
AlibabaCampusMcMessageboxQuerymessageResponse rsp = client.execute(req);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<alibaba_campus_mc_messagebox_querymessage_response>
    <result>
        <contents>
            <content>
                <target_mobile_url>xx.xx.com/xx</target_mobile_url>
                <type>XXX</type>
                <resource_id>1</resource_id>
                <company_id>1</company_id>
                <status>1</status>
                <action>1</action>
                <event_time_millis>1232131</event_time_millis>
                <content>123</content>
                <title>111</title>
                <receiver>1</receiver>
                <sender>1</sender>
                <id>1</id>
            </content>
        </contents>
        <total_count>123</total_count>
        <request_id>1</request_id>
        <error_code>200</error_code>
        <error_msg>ok</error_msg>
        <success>true</success>
        <error_level>0</error_level>
        <error_ext_info>{&quot;errormsg&quot;:&quot;ok&quot;}</error_ext_info>
    </result>
</alibaba_campus_mc_messagebox_querymessage_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

返回
顶部