Validate verification
GET https://verify.8x8.com/api/v2/subaccounts/:subAccountId/sessions/:sessionId
This method allows you to check the status of a verification request or to validate a code submitted by one of your user.
Request
Path Parameters
Possible values: >= 3 characters and <= 50 characters, Value must match regular expression ^[A-Za-z0-9\-._&]{3,50}$
You must replace {subAccountId} with the subaccountid that you want to use. By default this is generated once you signed up with a new account at https://connect.8x8.com.
SessionId generated on verification request
Query Parameters
Possible values: >= 3 characters and <= 10 characters
This is the code that you are trying to validate against the initial request. Most likely, it is coming from your user input and you want to check whether it is the code that was generated by the API
Verification session status retrieved successfully
Schema
- WAITING (intermediary): it means that the verify request did not reach its expiry time and the API did not receive a token yet.
- VERIFIED (final): it means that the last token has been successfully checked against the mobile verification request within the validity time.
- FAILED (final): it means that the token verification has failed: the API accepts up to 5 attempts to provide the right code, if the fifth tentative is unsuccessful, the status is set to FAILED and cannot be reversed.
- EXPIRED (final): it means that the verification request reached its expiry time without receiving a token matching the one originally generated.
Unique id associated with the verification request.
It should used to verify the status of a request or check a code sent back by a user.
If several codes are generated for the same request, the sessionId will remain the same.
This is the prefix and the path to the verify request, it allows you to locate it easily.
Destination phone number to which the verification code was sent in international format (containing the international dialing prefix).
The current status of the verify request.
It can take the following values:
Possible values: [WAITING, VERIFIED, FAILED, EXPIRED]
Shows the count of unsuccessful attempts to verify a code for the current mobile verification request.
Possible values: >= 0 and <= 255
0
Shows the time at which the mobile verification request will expire.
Indicates how long the user should wait before resending the verification request for current session.
sma object
SMA channel-specific response object.
URL to be invoked in the background of client's mobile device to verify phone number via mobile data network.
{
"sessionId":"18b526ad-d063-48c0-bb93-4e71f042f047",
"verifyUri":"https://verify.8x8.com/api/v2/subaccounts/demo-account-123/sessions/18b526add06348c0bb934e71f042f047",
"destination":"6598765432",
"status":"WAITING",
"attempt":0,
"expiresAt":"2025-12-18T14:05:00.1254323+00:00",
"retryAfter":"2025-12-18T14:00:20.1254323+00:00"
}
{
"sessionId":"a44a91be5ea5ea118169020897df5459",
"verifyUri":"/api/v2/subaccounts/demo-account-123/sessions/a44a91be5ea5ea118169020897df5459",
"destination":"+19876543210",
"status":"VERIFIED",
"attempt":0,
"expiresAt":"2025-12-18T05:59:54.09Z",
"retryAfter":"2025-12-18T05:55:04.09Z"
}
Bad request error response
Schema
Error code
Error description
Unique id of error. You can use it as reference when sending enquiries to 8x8 support
Date and time of the error occurrence
{
"code":1001,
"message":"Provided subAccountId doesn't belong to your account",
"errorId":"91b106f0-c0da-4aba-a43a-7af9c5893a80",
"timestamp":"2025-12-18T10:31:19.4297387+00:00"
}
Request was not authenticated response
Schema
Error code
Error description
Unique id of error. You can use it as reference when sending enquiries to 8x8 support
Date and time of the error occurrence
{
"code":1001,
"message":"Provided subAccountId doesn't belong to your account",
"errorId":"91b106f0-c0da-4aba-a43a-7af9c5893a80",
"timestamp":"2025-12-18T10:31:19.4297387+00:00"
}
Session not found
Schema
Error code
Error description
Unique id of error. You can use it as reference when sending enquiries to 8x8 support
Date and time of the error occurrence
{
"code":1001,
"message":"Provided subAccountId doesn't belong to your account",
"errorId":"91b106f0-c0da-4aba-a43a-7af9c5893a80",
"timestamp":"2025-12-18T10:31:19.4297387+00:00"
}
{
"code":1404,
"message":"Session not found",
"errorId":"a1b2c3d4-e5f6-7890-1234-567890abcdef",
"timestamp":"2025-12-18T10:00:00.000Z"
}
Internal server error
Schema
Error code
Error description
Unique id of error. You can use it as reference when sending enquiries to 8x8 support
Date and time of the error occurrence
{
"code":1001,
"message":"Provided subAccountId doesn't belong to your account",
"errorId":"91b106f0-c0da-4aba-a43a-7af9c5893a80",
"timestamp":"2025-12-18T10:31:19.4297387+00:00"
}
Source: https://developer.8x8.com/connect/reference/code-validation-v-2 · 8x8 CPaaS Developer Docs. Synced for support deflection.
0 Comments