Customer Identity (CIAM)
Verify Graphical Captcha
This document introduces the content related to calling the Verify Graphical Captcha interface after sliding the captcha slider.
# Request Description
POST https://{your_domain}/api/v2/sdk/captcha/verify
# Request Headers
| Parameter Name | Chinese Name | Required | Type | Example |
|---|---|---|---|---|
| X-operating-sys-version | Caller Client OS Version | Yes | String | windows10.1.1 |
| X-device-fingerprint | Caller Client Device Fingerprint | Yes | String | 156aysdna213sc50 |
| X-device-ip | Caller Client IP | No | String | 192.168.1.2 |
| X-agent | User-Agent Information | Yes | String | Mozilla/5.0 (iPhone; CPU iPhone OS 13_3 like Mac OS X) |
| X-L | For Internationalization Language Setting | No | String | zh |
| X-client-id | Application Authorization ID | Yes | String | nTo1eRIub60vPb54WeE6aojPwYwImtl4 |
| content-type | Content Format Type | Yes | String | application/json |
# Request Example
For sending mobile verification code scenario
{
"point_json": "{\"x\":237.0,\"y\":5.0}",
"token": "71dd26999e314f9abb0c635336976635",
"sender": "15200000000"
}
For sending email verification code scenario
{
"point_json": "{\"x\":237.0,\"y\":5.0}",
"token": "71dd26999e314f9abb0c635336976635",
"sender": "15200000000@163.com"
}
1
2
3
4
5
6
7
8
9
10
11
12
13
2
3
4
5
6
7
8
9
10
11
12
13
# Request Parameters
| Parameter | Chinese Name | Required | Type | Description |
|---|---|---|---|---|
| point_json | Coordinate Information | Yes | String | Coordinate information, y-axis fixed value 5.0 Refer to JS、VUE Puzzle CAPTCHA DEMO for obtaining coordinate information |
| token | CAPTCHA Identity Token | Yes | String | The token returned by obtaining the CAPTCHA |
| sender | Sender | Yes | String | Sender (mobile number, email) |
# Response Example
Success example:
HTTP/1.1 200 OK
Content-Type: application/json
{
"captcha_token":"71dd26999e314f9abb0c635336976635---{\"x\":237.0,\"y\":5.0}"
}
Error example:
HTTP/1.1 400 Bad Request
{
"error_code": "IDAAS.SDK.CAPTCHA.0002",
"error_msg": "Graphic verification code verification failed"
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
2
3
4
5
6
7
8
9
10
11
12
13
14
# Return Parameters
| Parameter Name | Chinese Name | Type | Description |
|---|---|---|---|
| captcha_token | CAPTCHA Verification Token | String | Token returned upon successful CAPTCHA verification. |
# Error Codes
| Status Code | Error Code | Error Message | Handling Measures |
|---|---|---|---|
| 400 | IDAAS.SDK.PARAM.0001 | Device information is incomplete | Please check if the input device information is complete. |
| Device information is incomplete | |||
| 400 | IDAAS.SDK.PARAM.0002 | clientId cannot be empty | Please check if the input clientId is empty. |
| clientId cannot be empty | |||
| 400 | IDAAS.SDK.PARAM.0003 | The app is not registered, please register the app first | Please check if the input clientId is correct. |
| The app is not registered, please register the app first | |||
| 400 | IDAAS.SDK.PARAM.0004 | Point json cannot be empty | Please check if the input coordinate information is empty. |
| Coordinate information cannot be empty | |||
| 400 | IDAAS.SDK.PARAM.0005 | Token cannot be empty | Please check if the input CAPTCHA identity token is empty. |
| CAPTCHA identity token cannot be empty | |||
| 400 | IDAAS.SDK.PARAM.0006 | Sender cannot be empty | Please check if the input sender is empty. |
| Sender cannot be empty | |||
| 400 | IDAAS.SDK.CAPTCHA.0002 | Graphic verification code verification failed | Please check if the input items are correct and retry the call. |
| Graphic verification code verification failed |
