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

文档中心 > API类目 > 公益三小时公共

alibaba.charity.charitytime.commonauth (通用授权)

三小时和外部账号绑定通用top 返回跳转链接进行绑定

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
jump_address_hsf_request JumpAddressHsfRequest 可选 请求对象
  • └ user_nick
  • String
  • 必须
  • 张x三
  • 三方用户昵称,建议脱敏
  • └ app_key
  • String
  • 必须
  • 314xxx
  • appKey
  • └ user_key
  • String
  • 必须
  • 2088xx
  • 三方用户id
  • └ platform
  • String
  • 可选
  • ALIPAY
  • 跳转平台的类型,会生成不同平台的uri ALIPAY:支付宝 OTHER:其他

响应参数

名称 类型 示例值 描述
result CsrResult 结果
  • └ msg
  • String
  • SUCCESS
  • 接口响应消息
  • └ code
  • Number
  • 200
  • 状态码:200表示正常,非200表示异常
  • data
  • JumpAddressHsfResponse
  • 公益时授权链接结果
  • └ jump_url
  • String
  • https://3hours.taobao.com/commonAuth?token=xxxx&openBizCode=xxx
  • 跳转地址

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaCharityCharitytimeCommonauthRequest req = new AlibabaCharityCharitytimeCommonauthRequest();
AlibabaCharityCharitytimeCommonauthRequest.JumpAddressHsfRequest obj1 = new AlibabaCharityCharitytimeCommonauthRequest.JumpAddressHsfRequest();
obj1.setUserNick("张x三");
obj1.setAppKey("314xxx");
obj1.setUserKey("2088xx");
obj1.setPlatform("ALIPAY");
req.setJumpAddressHsfRequest(obj1);
AlibabaCharityCharitytimeCommonauthResponse rsp = client.execute(req);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<alibaba_charity_charitytime_commonauth_response>
    <result>
        <msg>SUCCESS</msg>
        <code>200</code>
        <data>
            <jump_url>https://3hours.taobao.com/commonAuth?token=xxxx&amp;openBizCode=xxx</jump_url>
        </data>
    </result>
</alibaba_charity_charitytime_commonauth_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

返回
顶部