Verifying a CAPTCHA Code
Function
This API is used to verify a CAPTCHA code.
URI
POST /api/v2/sdk/captcha/verify
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
Content-Type |
Yes |
String |
Set this field to "application/json;charset=utf8". |
X-operating-sys-version |
Yes |
String |
Caller OS version, for example, Android 10. |
X-device-fingerprint |
Yes |
String |
Caller device fingerprint, for example, 156aysdna213sc50. |
X-device-ip |
No |
String |
Caller IP address, for example, 10.10.10.1 |
X-agent |
Yes |
String |
User agent information, for example, Mozilla/5.0 (Linux; Android 10; Redmi K30 Build/QKQ1.190825.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/80.0.3987.99 Mobile Safari/537.36 |
X-L |
No |
String |
Language type, for example, en. |
X-client-id |
Yes |
String |
Application ID, which is a ClientId allocated to an application after registration. |
X-tenant-id |
No |
String |
Tenant ID. This parameter is mandatory when calling an ISV application. Replace "{domain_name}" with the ISV common domain name "{common_domain}". In the request header, specify tenant_id of the corresponding tenant and replace X-client-id with client_id of the ISV application template. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
point_json |
Yes |
String |
Coordinate information. The Y axis value is fixed at 5.0. |
token |
Yes |
String |
Obtain the token returned by the CAPTCHA code. |
sender |
Yes |
String |
Sender (mobile phone number or email address). |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
captcha_token |
String |
CAPTCHA credential. |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error details. |
Example Requests
Verify a CAPTCHA code. Coordinate information is {"x":237.0,"y":5.0}, the token is 71d******635, and the sender's mobile number is 12345678901.
POST https://{domain_name}/api/v2/sdk/captcha/verify X-operating-sys-version: Android 10 X-device-fingerprint: 156aysdna213sac X-device-ip: 10.10.10.1 X-agent: Mozilla/5.0 (Linux; Android 10; Redmi K30 Build/QKQ1.190825.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/80.0.3987.99 Mobile Safari/537.36 X-L: zh X-client-id: DRrYIqauawN0I8myTMoDTPys6ezGZxnm X-tenant-id: 08f770f51f80d2f40f38c00cb199fd21 { "point_json": "{\"x\":237.0,\"y\":5.0}", "token": "71d******635", "sender": "12345678901" }
Example Responses
Status code: 200
Request successful.
{ "captcha_token" : "71d******635---{\"x\":237.0,\"y\":5.0}" }
Status Codes
Status Code |
Description |
---|---|
200 |
Request successful. |
400 |
Invalid parameter. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot