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 | 
 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 | 
 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 | 
 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 | 
 Optional. 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 | 
 Optional. 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 ( | 
| Fields | |
|---|---|
| kind | 
 | 
| email | 
 The email associated with the out-of-band code that was used. | 
| newEmail | 
 | 
| requestType | 
 | 
| mfaInfo | 
 | 
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.