文档中心 > API类目 > 淘宝互动平台开放招募

taobao.interaction.tblife.user.info.get (获取(当前)用户信息)

获取(当前)用户信息

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述

响应参数

名称 类型 示例值 描述
output OpenResponse 响应信息
  • └ trace_id
  • String
  • xxx
  • 追踪id
  • └ msg
  • String
  • xxx
  • 响应信息(通常用于请求报错时,返回报错信息)
  • └ code
  • String
  • xxx
  • 响应码
  • data
  • OpenUserInfoDTO
  • 业务数据
  • └ user_id
  • String
  • xxx
  • 用户id
  • └ nick
  • String
  • xxx
  • 昵称
  • └ sex
  • String
  • MALE
  • 性别
  • └ avatar
  • String
  • https://xxx
  • 头像
  • └ button_num
  • Number
  • 1000
  • 纽扣数量
  • └ success
  • Boolean
  • true
  • 是否成功
  • └ server_time
  • Number
  • 1669352100137
  • 服务器时间

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
1
2
3
4
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
InteractionTblifeUserInfoGetRequest req = new InteractionTblifeUserInfoGetRequest();
InteractionTblifeUserInfoGetResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<interaction_tblife_user_info_get_response>
    <output>
        <trace_id>xxx</trace_id>
        <msg>xxx</msg>
        <code>xxx</code>
        <data>
            <user_id>xxx</user_id>
            <nick>xxx</nick>
            <sex>MALE</sex>
            <avatar>https://xxx</avatar>
            <button_num>1000</button_num>
        </data>
        <success>true</success>
        <server_time>1669352100137</server_time>
    </output>
</interaction_tblife_user_info_get_response>

异常示例

  • XML示例
  • JSON示例
1
2
3
4
5
6
<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

返回
顶部