Forgot Password

How to issue a forgot password through the Cosync REST API

Forgot password will send a code to an email or phone number handle in order to reset the password for an app. This is used when the user has forgotten his/her password and cannot login to the app.

URL
     /api/appuser/forgotPassword
Method
    POST
Headers
    app-token: "<App Token>"
Data Parameter
    {
        handle: "<user handle>",
    }

Response:

Success:

StatusCode:
    200 (OK)
Contents:
    true

Error:

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

The internal codes are integers:

  • 400 - invalid app token
  • 401 - app no longer exists
  • 402 - app is suspended
  • 403 - missing parameter
  • 404 - user account is suspended
  • 500 - internal server error
  • 602 - invalid data
  • 603 - email does not exist