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

alibaba.security.deepvision.proxy.devicemanager.getauthkey (获取AuthKey)

设备授权申请,以获取authKey - 弹外代理

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
param GenerateAuthKeyReq 必须 参数
  • └ uid
  • String
  • 必须
  • 1
  • 用户ID
  • └ test
  • Number
  • 可选
  • 1
  • 是否测试:0-否,1-是
  • └ function
  • String
  • 必须
  • face
  • 要授权的功能
  • └ activation_code
  • String
  • 必须
  • 1
  • 激活码
  • └ user_device_id
  • String
  • 必须
  • 1
  • 用户设备标识,建议唯一
  • └ device_id
  • String
  • 可选
  • 1
  • 业务上的设备id,若客户端有,则传,本设备不会当新设备处理
  • └ umid_token
  • String
  • 可选
  • 1
  • 设备指纹Token
  • └ umid_type
  • String
  • 可选
  • umid
  • 设备指纹类型
  • └ app_name
  • String
  • 可选
  • 123
  • appName

响应参数

名称 类型 示例值 描述
message String 成功 返回描述,错误信息
resp_code Number 200 返回码,200表示成功
result AuthKeyResp 对象 返回对象
  • └ pub_key
  • String
  • Kuxsw8d......
  • RSA公钥
  • └ device_id
  • String
  • 1
  • 服务端为该设备分配的设备ID
  • └ auth_key
  • String
  • 1
  • 授权key
resp_request_id String 1 请求唯一ID

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaSecurityDeepvisionProxyDevicemanagerGetauthkeyRequest req = new AlibabaSecurityDeepvisionProxyDevicemanagerGetauthkeyRequest();
AlibabaSecurityDeepvisionProxyDevicemanagerGetauthkeyRequest.GenerateAuthKeyReq obj1 = new AlibabaSecurityDeepvisionProxyDevicemanagerGetauthkeyRequest.GenerateAuthKeyReq();
obj1.setUid("1");
obj1.setTest(1L);
obj1.setFunction("face");
obj1.setActivationCode("1");
obj1.setUserDeviceId("1");
obj1.setDeviceId("1");
obj1.setUmidToken("1");
obj1.setUmidType("umid");
obj1.setAppName("123");
req.setParam(obj1);
AlibabaSecurityDeepvisionProxyDevicemanagerGetauthkeyResponse rsp = client.execute(req);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<alibaba_security_deepvision_proxy_devicemanager_getauthkey_response>
    <message>成功</message>
    <resp_code>200</resp_code>
    <result>
        <pub_key>Kuxsw8d......</pub_key>
        <device_id>1</device_id>
        <auth_key>1</auth_key>
    </result>
    <resp_request_id>1</resp_request_id>
</alibaba_security_deepvision_proxy_devicemanager_getauthkey_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

返回
顶部