文档中心 > API类目 > 天眼工作室API

alibaba.security.deepvision.proxy.security.common.token.get (获取Security Token)

获取Security token

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
param SecurityTokenQueryParam 可选 参数
  • └ product_code
  • String
  • 必须
  • 1
  • 云产品
  • └ scene_code
  • String
  • 必须
  • 1
  • 来源场景
  • └ request_id
  • String
  • 可选
  • 1
  • 请求唯一ID
  • └ usage_scene
  • String
  • 必须
  • 1
  • 使用场景
  • └ op_poi_id
  • String
  • 必须
  • 1
  • 门店
  • └ op_tenant_code
  • String
  • 必须
  • 1
  • 租户
  • └ token
  • String
  • 可选
  • 1
  • token

响应参数

名称 类型 示例值 描述
result SecurityTokenCredential Token
  • └ access_key_id
  • String
  • 1
  • 临时AK
  • └ access_key_secret
  • String
  • 1
  • 临时AK
  • └ product_code
  • String
  • 1
  • 产品code
  • └ end_point_public
  • String
  • 1
  • 公网endpoint
  • └ scene_code
  • String
  • 1
  • 来源场景
  • └ end_point_internal
  • String
  • 1
  • 内网endpoint
  • └ expiration
  • String
  • 1
  • 过期时间
  • └ tenant_code
  • String
  • 1
  • 租户
  • └ field_id
  • String
  • 1
  • 门店
  • policy
  • Policy
  • 策略
  • └ version
  • String
  • 1
  • 策略
  • statement
  • Datas []
  • Statement
  • └ resource
  • String []
  • resource
  • └ effect
  • String
  • 1
  • effect
  • └ action
  • String []
  • action
  • └ token
  • String
  • 1
  • Token
resp_code Number 1 返回码
resp_success Boolean token 是否成功
resp_request_id String 1 请求唯一ID
message String 成功 返回描述

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaSecurityDeepvisionProxySecurityCommonTokenGetRequest req = new AlibabaSecurityDeepvisionProxySecurityCommonTokenGetRequest();
AlibabaSecurityDeepvisionProxySecurityCommonTokenGetRequest.SecurityTokenQueryParam obj1 = new AlibabaSecurityDeepvisionProxySecurityCommonTokenGetRequest.SecurityTokenQueryParam();
obj1.setProductCode("1");
obj1.setSceneCode("1");
obj1.setRequestId("1");
obj1.setUsageScene("1");
obj1.setOpPoiId("1");
obj1.setOpTenantCode("1");
obj1.setToken("1");
req.setParam(obj1);
AlibabaSecurityDeepvisionProxySecurityCommonTokenGetResponse rsp = client.execute(req);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<alibaba_security_deepvision_proxy_security_common_token_get_response>
    <result>
        <access_key_id>1</access_key_id>
        <access_key_secret>1</access_key_secret>
        <product_code>1</product_code>
        <end_point_public>1</end_point_public>
        <scene_code>1</scene_code>
        <end_point_internal>1</end_point_internal>
        <expiration>1</expiration>
        <tenant_code>1</tenant_code>
        <field_id>1</field_id>
        <policy>
            <version>1</version>
            <statement>
                <datas>
                    <effect>1</effect>
                </datas>
            </statement>
        </policy>
        <token>1</token>
    </result>
    <resp_code>1</resp_code>
    <resp_success>token</resp_success>
    <resp_request_id>1</resp_request_id>
    <message>成功</message>
</alibaba_security_deepvision_proxy_security_common_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

返回
顶部