文档中心 > API类目 > 电子发票

alibaba.einvoice.revenue.token.get (税局访问令牌信息查询)

商家小程序获取税局访问令牌信息

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
token_query_info UserTokenGetDto 必须 用户访问令牌信息查询信息
  • └ platform_code
  • String
  • 必须
  • FPGJ
  • 平台标识

响应参数

名称 类型 示例值 描述
result RevenueUserTokenDto 访问令牌信息
  • └ expires
  • Number
  • 7200
  • 过期时间
  • └ token
  • String
  • shflsfhwoefihwow
  • 访问令牌
  • └ authorization_url
  • String
  • http://47.99.15.119/dzswj/sqbd/index.html
  • 授权页地址

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaEinvoiceRevenueTokenGetRequest req = new AlibabaEinvoiceRevenueTokenGetRequest();
AlibabaEinvoiceRevenueTokenGetRequest.UserTokenGetDto obj1 = new AlibabaEinvoiceRevenueTokenGetRequest.UserTokenGetDto();
obj1.setPlatformCode("FPGJ");
req.setTokenQueryInfo(obj1);
AlibabaEinvoiceRevenueTokenGetResponse rsp = client.execute(req);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<alibaba_einvoice_revenue_token_get_response>
    <result>
        <expires>7200</expires>
        <token>shflsfhwoefihwow</token>
        <authorization_url>http://47.99.15.119/dzswj/sqbd/index.html</authorization_url>
    </result>
</alibaba_einvoice_revenue_token_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

返回
顶部