文档中心 > API类目 > 阿里云用户API

aliyun.account.session.get (淘宝session获取)

淘宝session获取

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
get_session_request GetSessionRequest 可选 1
  • └ caller_parent_id
  • Number
  • 可选
  • 1
  • 1
  • └ access_key_id
  • String
  • 可选
  • 1
  • 1
  • └ session_key
  • String
  • 可选
  • 1
  • 1
  • └ app_name
  • String
  • 可选
  • aliyunid-portal
  • 1
  • └ sts_token_caller_bid
  • Number
  • 可选
  • 1
  • 1
  • └ auth_from
  • String
  • 可选
  • miniApp
  • 1
  • └ caller_bid
  • Number
  • 可选
  • 1
  • 1
  • └ version
  • String
  • 可选
  • 1
  • 1
  • └ security_token
  • String
  • 可选
  • 1
  • 1
  • └ source_ip
  • String
  • 可选
  • 1
  • 1
  • └ request_id
  • String
  • 可选
  • 1
  • 1
  • └ caller_type
  • String
  • 可选
  • 1
  • 1
  • └ caller_uid
  • Number
  • 可选
  • 1
  • 1
  • └ null_object
  • Boolean
  • 可选
  • false
  • 1
  • └ sts_token_caller_uid
  • Number
  • 可选
  • 1
  • 1

响应参数

名称 类型 示例值 描述
data TaobaoSessionDto 响应dto
  • └ havana_id
  • Number
  • 1
  • HavanaID
http_code String 1 pop参数
message String 1 pop参数
null_object Boolean true pop参数

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AliyunAccountSessionGetRequest req = new AliyunAccountSessionGetRequest();
AliyunAccountSessionGetRequest.GetSessionRequest obj1 = new AliyunAccountSessionGetRequest.GetSessionRequest();
obj1.setCallerParentId(1L);
obj1.setAccessKeyId("1");
obj1.setSessionKey("1");
obj1.setAppName("aliyunid-portal");
obj1.setStsTokenCallerBid(1L);
obj1.setAuthFrom("miniApp");
obj1.setCallerBid(1L);
obj1.setVersion("1");
obj1.setSecurityToken("1");
obj1.setSourceIp("1");
obj1.setRequestId("1");
obj1.setCallerType("1");
obj1.setCallerUid(1L);
obj1.setNullObject(false);
obj1.setStsTokenCallerUid(1L);
req.setGetSessionRequest(obj1);
AliyunAccountSessionGetResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<aliyun_account_session_get_response>
    <data>
        <havana_id>1</havana_id>
    </data>
    <http_code>1</http_code>
    <message>1</message>
    <null_object>true</null_object>
</aliyun_account_session_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

返回
顶部