Updated on 2026-04-16 GMT+08:00

Verifying a Verification Code

Function

Verify a verification code.

URI

POST /koodrive/ose/verify/code/validate

Request Parameters

Table 1 Request header parameters

Parameter

Mandatory

Type

Description

X-Traceid

No

String

Definition:

Service trace ID, which contains 58 bits.

Constraints:

N/A

Range:

The value contains 58 bits.

Default Value:

N/A

x-hw-agentName

Yes

String

Definition:

Agent name.

Constraints:

N/A

Range:

N/A

Default Value:

N/A

Table 2 Request body parameters

Parameter

Mandatory

Type

Description

requestId

Yes

String

Request ID.

code

Yes

String

Verification code.

codeType

Yes

String

Application scenario of the verification code. 1: registration. 2: login. 3: password resetting. 4: mobile number change.

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

code

String

Error Codes

msg

String

Error description.

data

data object

Response to the request for verifying a verification code.

Table 4 data

Parameter

Type

Description

verified

Boolean

Whether the verification is successful.

token

String

Token after the verification is successful.

expireAt

String

Expiration time.

failCount

String

Number of failures within the check time. This parameter is mandatory when the check fails.

Example Requests

POST /koodrive/ose/verify/code/validate

{
  "requestId" : "1893584627570952064",
  "code" : "4719",
  "codeType" : "1"
}

Example Responses

Status code: 200

Response to the request for verifying a verification code.

{
  "data" : {
    "verified" : true,
    "token" : "8VKh3YgjNs+VJqbCqo/ouhqBJaLaK/5WLEQXOzdCU3o=",
    "expireAt" : "2026-02-25T08:26:31.514"
  },
  "code" : 0,
  "msg" : "Success"
}

Status Codes

Status Code

Description

200

Response to the request for verifying a verification code.