Verify Phone

How to verify a user phone number through the Cosync REST API

Verify the phone number of the user. This call must include the six-digit code that was sent by the setPhone function.

URL
    /api/appuser/verifyPhone
Method
    POST
Headers
    access-token: "<Access Token>"
Data Parameter
    {
        code: "<phone verification code>",
    }

Response:

Success:

StatusCode:
    200 (OK)
Contents:
    None

Error:

StatusCode:
    400 (BAD REQUEST)
    500 (INTERNAL SERVER ERROR)
Content:
    {
        code: "<internal error code>",
        message: "<readable error description>"
    }

The internal codes are integers:

  • 401 - app no longer exists
  • 402 - app is suspended
  • 403 - missing parameter
  • 404 - user account is suspended
  • 405 - invalid access token
  • 500 - internal server error
  • 602 - invalid data