Method: accounts.resetPassword

Resets the password of an account either using an out-of-band code generated by sendOobCode or by specifying the email and password of the account to be modified. Can also check the purpose of an out-of-band code without consuming it.

HTTP request

POST https://identitytoolkit.googleapis.com/v1/accounts:resetPassword

The URL uses gRPC Transcoding syntax.

Request body

The request body contains data with the following structure:

JSON representation
{
  "oobCode": string,
  "newPassword": string,
  "oldPassword": string,
  "email": string,
  "tenantId": string
}
Fields
oobCode

string

An out-of-band (OOB) code generated by accounts.sendOobCode request. Specify only this parameter (or only this parameter and a tenant ID) to get the out-of-band code's type in the response without mutating the account's state. Only a PASSWORD_RESET out-of-band code can be consumed via this method.

newPassword

string

The new password to be set for this account. Specifying this field will result in a change to the account and consume the out-of-band code if one was specified and it was of type PASSWORD_RESET.

oldPassword

string

The current password of the account to be modified. Specify this and email to change an account's password without using an out-of-band code.

email

string

The email of the account to be modified. Specify this and the old password in order to change an account's password without using an out-of-band code.

tenantId

string

The tenant ID of the Identity Platform tenant the account belongs to.

Response body

Response message for accounts.resetPassword.

If successful, the response body contains data with the following structure:

JSON representation
{
  "kind": string,
  "email": string,
  "newEmail": string,
  "requestType": enum (OobReqType),
  "mfaInfo": {
    object (MfaEnrollment)
  }
}
Fields
kind
(deprecated)

string

email

string

The email associated with the out-of-band code that was used.

newEmail

string

requestType

enum (OobReqType)

mfaInfo

object (MfaEnrollment)

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/identitytoolkit
  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.