Logo Site EngageLab Mark Colored TransparentDocument
Search

Verify OTP

Request URL

POST https://otp.api.engagelab.cc/v1/verifications

Authentication

Please refer to Authentication to learn how to perform API authentication.

Request Example

Request Header

POST /v1/verifications HTTP/1.1 Content-Type: application/json Authorization: Basic amlndWFuZ2RldjpkZXZfc2VjcmV0
              
              POST /v1/verifications  HTTP/1.1  
Content-Type: application/json  
Authorization: Basic amlndWFuZ2RldjpkZXZfc2VjcmV0

            
This code block in the floating window

Request Body

{ "message_id": "1725407449772531712", "verify_code": "667090" }
              
              {
    "message_id": "1725407449772531712",
    "verify_code": "667090"
}

            
This code block in the floating window

Request Parameters

Parameter Type Option Description
message_id String Required Message id corresponding to the verification code, returned by the /messages interface
verify_code String Required The verification code to be verified

Response Parameters

Success Response

Field Type Option Description
message_id String Required Message id corresponding to the verification code, returned by the /v1/messages interface
verify_code String Required The verification code to be verified
verified Boolean Required Verification result, true means verification succeeded, false means verification failed
{ "message_id": "1725407449772531712", "verify_code": "667090", "verified": true }
              
              {
    "message_id": "1725407449772531712",
    "verify_code": "667090",
    "verified": true
}

            
This code block in the floating window

Note that for a verification request of the verification code of the same message, if the verification code is successfully verified, and this verification interface is requested again, the interface will return a failure, prompting that the verification code for this message has been verified; that is, it does not support verifying the verification code again after successful verification.

Failure Response

The HTTP status code is 4xx or 5xx, and the response body contains the following fields:

Field Type Option Description
code int Required Error code, see error code description for details
message String Required Error details
{ "code": 3003, "message": "verify code has expired" }
              
              {
    "code": 3003,
    "message": "verify code has expired"
}

            
This code block in the floating window

Error Codes

Error Code HTTP Code Description
1000 500 Internal error
2001 401 Authentication failed, incorrect token carried
2002 401 Authentication failed, token has expired or been disabled
2004 403 No permission to call this API
3001 400 Invalid request parameter format, please check if the JSON content conforms to the parameter format
3002 400 Incorrect request parameters, please check if the request parameters meet the requirements
3003 400 Verification code has expired or has been verified. For the response of this error code, a new verification code message needs to be sent again
3011 400 Verification code expired
4001 400 The message does not exist
Icon Solid Transparent White Qiyu
Contact Sales