注意:以下文档只适用于TOP接口,请谨慎使用!

文档中心 > API类目 > 天猫精灵开放API

taobao.ailab.aicloud.top.subscribe (消息号订阅接口)

天猫精灵提供了服务主体概念,用户可以主动订阅服务主体,提供外部调用订阅接口能力

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
open_user_id String 可选 xxxx 开放用户id

响应参数

名称 类型 示例值 描述
result_code Number 0 0-成功
result_data Boolean true 订阅结果
error_msg String 错误信息 错误信息
trace_id String traceId traceId

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AilabAicloudTopSubscribeRequest req = new AilabAicloudTopSubscribeRequest();
req.setOpenUserId("xxxx");
AilabAicloudTopSubscribeResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<ailab_aicloud_top_subscribe_response>
    <result_code>0</result_code>
    <result_data>true</result_data>
    <error_msg>错误信息</error_msg>
    <trace_id>traceId</trace_id>
</ailab_aicloud_top_subscribe_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

返回
顶部