Skip to content

setRecoveryEmailAddress

Sahri Riza Umami edited this page Jun 6, 2018 · 1 revision

Changes the recovery email address of the user.
If a new recovery email address is specified, then the error EMAIL_UNCONFIRMED is returned and the email address will not be changed until the new email has been confirmed.
The application should periodically call getPasswordState to check whether the email address has been confirmed.

If new_recovery_email_address is the same as the email address that is currently set up, this call succeeds immediately and aborts all other requests waiting for an email confirmation.

setRecoveryEmailAddress(password, new_recovery_email_address)
Field Type Description
password string Password of the current user
new_recovery_email_address string New recovery email address

Example

  • Changes the recovery email address of the user.

    setRecoveryEmailAddress('m98TFcfhoo875', 'anunia@email.com')

    Response:

    {
      ["@type"] = "passwordState",
      has_password = true,
      has_recovery_email_address = true,
      password_hint = "anonymous",
      unconfirmed_recovery_email_address_pattern = ""
    }

Frequently Asked Questions
The Functions

Clone this wiki locally