行为验证 API
最近更新:2022-10-27

行为验证 API

功能说明

行为验证:当用户在前端界面通过验证码后,会产生一批与验证码相关的加密参数,开发者后台跟进业务场景再将这些参数上传到二次校验接口,确认该用户本次验证的有效性。

调用地址

支持 Android 和 iOS 平台使用

POST https://api.verification.jpush.cn/action/check

调用验证

详情参见 REST API 概述的 鉴权方式 说明。

请求示例

curl --insecure -X POST -v https://api.verification.jpush.cn/action/check -H "Content-Type: application/json" -u "7d431e42dfa6a6d693ac2d04:5e987ac6d2e04d95a9d8f0d1" -d '{ "captchaContent": "ZnzfTTCrPZuLk1J_kxXnGu6IKhjhGCIQp3_yTBs7G_5hhGJpJzMGGcVgSHq8CI6yFpAHQdhz1WbM3hICmkxG2a-DZXRIDdDic6Nbll-N0KnfYyZGv-ZDuiOQSW2r1NMBuoyT82vrOgxoFgAxJdeeeYINXWwuRMFX2Ms9YDfPliRlNBx4qivro84z3146PvGVjuL8tjDKo5N3wTwBDwChaj2qakZN47tsX_QN5cdTPZC0rdP_ugv9TnMwH7OeOhX1w5woFuqru-2_odcfS22yEtC_4qh8Zse2ks7-QS7ISiTdeBUdOmIrGV9JRv439kHBLfLNvriP7lB3MRDsIcD3A17MI98VfzQp8cgUiBgfogV7qLZLQ4lSbpZwL1qlRmBV9xGwNeattCQ5Zg7NBA9YK01MpnLTHYb5HU9DyvLBn_st5loAaHztbtsCTBryrTZ6zYnf0SpxgXzHK-H4WipM4Q4CjcPbNhTWJ67smd44cwEvk-aN_OQmN2pw0P83Oy6q8WQrmbT01WFCjpu5ViPVf6PkMx0Ag8woajzGV_WGXZrLjRPbGBmS4XQpSwf6uuBwEjJhVWyu4gmvkTL3O1jqH0WYL6bDQq9tnwNsY2UtBRBwsi2SAP7lSuB3hrW9QvoSnKHzwOZKJlAArbrbRX_DTS6ITkmFAdHEy7FdH9JPZp9x_M9ETg0raXPEqQLFl4H9tC61DPi3IKQvNXHRn0P5NQ==", "exID": "1234566" }'
             curl --insecure -X POST -v https://api.verification.jpush.cn/action/check -H "Content-Type: application/json" -u "7d431e42dfa6a6d693ac2d04:5e987ac6d2e04d95a9d8f0d1" -d '{
    "captchaContent": "ZnzfTTCrPZuLk1J_kxXnGu6IKhjhGCIQp3_yTBs7G_5hhGJpJzMGGcVgSHq8CI6yFpAHQdhz1WbM3hICmkxG2a-DZXRIDdDic6Nbll-N0KnfYyZGv-ZDuiOQSW2r1NMBuoyT82vrOgxoFgAxJdeeeYINXWwuRMFX2Ms9YDfPliRlNBx4qivro84z3146PvGVjuL8tjDKo5N3wTwBDwChaj2qakZN47tsX_QN5cdTPZC0rdP_ugv9TnMwH7OeOhX1w5woFuqru-2_odcfS22yEtC_4qh8Zse2ks7-QS7ISiTdeBUdOmIrGV9JRv439kHBLfLNvriP7lB3MRDsIcD3A17MI98VfzQp8cgUiBgfogV7qLZLQ4lSbpZwL1qlRmBV9xGwNeattCQ5Zg7NBA9YK01MpnLTHYb5HU9DyvLBn_st5loAaHztbtsCTBryrTZ6zYnf0SpxgXzHK-H4WipM4Q4CjcPbNhTWJ67smd44cwEvk-aN_OQmN2pw0P83Oy6q8WQrmbT01WFCjpu5ViPVf6PkMx0Ag8woajzGV_WGXZrLjRPbGBmS4XQpSwf6uuBwEjJhVWyu4gmvkTL3O1jqH0WYL6bDQq9tnwNsY2UtBRBwsi2SAP7lSuB3hrW9QvoSnKHzwOZKJlAArbrbRX_DTS6ITkmFAdHEy7FdH9JPZp9x_M9ETg0raXPEqQLFl4H9tC61DPi3IKQvNXHRn0P5NQ==",
    "exID": "1234566"
}'

        
此代码块在浮窗中显示

请求参数

关键字 类型 选项 含义
captchaContent String 必填 二次校验所需
exID String 可选 开发者自定义的id,非必填

响应示例

请求成功

{ "id": 576044766492467200, "code": 6000, "content": "get action check success", "exID": "", "result": "success", "reason": "", "captchaArgs": { "used_type": "slide", "user_ip": "183.238.29.30", "lot_number": "f80971ac19db489b8054e0c81f9aabfc", "scene": "注册" } }
          {
    "id": 576044766492467200,
    "code": 6000,
    "content": "get action check success",
    "exID": "",
    "result": "success",
    "reason": "",
    "captchaArgs": {
        "used_type": "slide",
        "user_ip": "183.238.29.30",
        "lot_number": "f80971ac19db489b8054e0c81f9aabfc",
        "scene": "注册"
    }
}

        
此代码块在浮窗中显示

请求失败

{ "code": 1802, "content": "auth failed" }
          {
    "code": 1802,
    "content": "auth failed"
}

        
此代码块在浮窗中显示

响应参数

关键字 类型 含义
id Long 流水号,请求出错时可能为空
result String 二次校验结果
exID String 开发者自定义的id,若请求时为空返回为空
reason String 校验结果说明
captchaArgs Object 验证输出参数
code Integer 返回码
content String 返回码说明
文档内容是否对您有帮助?

Copyright 2011-2022, jiguang.cn, All Rights Reserved. 粤ICP备12056275号-13 深圳市和讯华谷信息技术有限公司

在文档中心打开