Verify

Location /api/apps/{appID}/users/me/phone-number/verify
This resource allows to verify the phone number of the user.

Request Headers (Applies to all methods)

Authorization
header
Required: Yes

POST

/api/apps/{appID}/users/me/phone-number/verify

Description

Verify the phone number of the user.

Content-Type application/vnd.kii.AddressVerificationRequest+json

The verification code must be provided.

Headers
Name Required? type Description
Authorization Yes string Authorization can be of type Basic or Bearer.
  • Authorization Basic: header for granting an anonymous access.
    • Set a Base64-encoded string of AppID and AppKey concatenated with a colon (APP_ID:APP_KEY).
    • The header should look like:
      Authorization: Basic czZCaGRSa3F0Mzo3RmpmcDBaQnIxS3REUmJuZlZkbUl3
  • Authorization Bearer: using Oauth2 Bearer Token.
    • The header should look like:
      Authorization: Bearer ht5fpHQAyrPPwLftK1rAqllv5WNVPCnYfPiCvPocFuQ
Params
Name Required? Type Description
verificationCode string The code for the verification.
Sample Request
{
  "verificationCode": "[string]"
}
Responses
200

Content-Type application/vnd.kii.AddressVerificationResponse+json

The verification has been done successfully.
Contents
Name Type Description
verificationStatus AddressVerificationStatus The status of the verification.
404

Content-Type application/vnd.kii.UserNotFoundException+json

The user was not found.
Contents
Name Type Description
errorCode string Error code "USER_NOT_FOUND".
message string The error message.
field string The field used for searching the user. This can be the userID or address field.
value string The field value used for searching the user.
appID string The ID of the application.
400

Content-Type application/vnd.kii.InvalidAccountStatusException+json

The phone number is already verified.
Contents
Name Type Description
errorCode string Error code "INVALID_ACCOUNT_STATUS".
message string The error message.
userID string The ID of the user.
appID string The ID of the application.
accountType AccountType The type of the account.
403

Content-Type application/vnd.kii.InvalidVerificationCodeException+json

The verification code is invalid.
Contents
Name Type Description
errorCode string Error code "INVALID_VERIFICATION_CODE".
message string The error message.
userID string The ID of the user.
appID string The ID of the application.
verificationCode string The verification code.
409

Content-Type application/vnd.kii.AddressAlreadyInUseException+json

The phone number is verified by another user.
Contents
Name Type Description
errorCode string Error code "USER_ALREADY_EXISTS".
message string The error message.
field string The field used to check the user already exists, can be "loginName", "emailAddress" or "phoneNumber".
value string The value of the field.
401

Content-Type application/vnd.kii.UserDisabledException+json

Failed to verify the phone number because the user is disabled.
Contents
Name Type Description
errorCode string Error code "USER_DISABLED".
message string The error message.
UserID string The ID of the user.
appID string The ID of the application.