The newest version of Google Identity Toolkit has been released as Firebase Authentication. It includes upgraded client SDKs, open source UI libraries, session management and integrated email sending service for forgotten password flows.

New projects should use Firebase Authentication. To migrate an existing project from Identity Toolkit to Firebase Authentication, see the migration guide.

Relyingparty: setAccountInfo

Set account info for a user.

Request

HTTP request

POST https://www.googleapis.com/identitytoolkit/v3/relyingparty/setAccountInfo

Request body

In the request body, supply data with the following structure:

{
  "idToken": string,
  "displayName": string,
  "localId": string,
  "email": string,
  "password": string,
  "provider": [
    string
  ],
  "oobCode": string,
  "emailVerified": boolean,
  "upgradeToFederatedLogin": boolean,
  "captchaChallenge": string,
  "captchaResponse": string
}
Property name Value Description Notes
idToken string The GITKit token of the authenticated user.
displayName string The name of the user.
localId string The local ID of the user.
email string The email of the user.
password string The new password of the user.
provider[] list The associated IDPs of the user.
oobCode string The out-of-band code of the change email request.
emailVerified boolean Mark the email as verified or not.
upgradeToFederatedLogin boolean Mark the user to upgrade to federated login.
captchaChallenge string The captcha challenge.
captchaResponse string Response to the captcha.

Response

If successful, this method returns a response body with the following structure:

{
  "kind": "identitytoolkit#SetAccountInfoResponse",
  "email": string,
  "displayName": string,
  "providerUserInfo": [
    {
      "providerId": string,
      "displayName": string,
      "photoUrl": string
    }
  ],
  "idToken": string
}
Property name Value Description Notes
kind string The fixed string "identitytoolkit#SetAccountInfoResponse".
email string The email of the user.
displayName string The name of the user.
providerUserInfo[] list The user's profiles at the associated IdPs.
providerUserInfo[].providerId string The IdP ID. For whitelisted IdPs it's a short domain name, e.g., google.com, aol.com, live.net and yahoo.com. For other OpenID IdPs it's the OP identifier.
providerUserInfo[].displayName string The user's display name at the IDP.
providerUserInfo[].photoUrl string The user's photo url at the IDP.
idToken string The Gitkit id token to login the newly sign up user.