Method: accounts.mfaEnrollment.start

Step one of the MFA enrollment process. In SMS case, this sends an SMS verification code to the user.

HTTP request

POST https://identitytoolkit.googleapis.com/v2/accounts/mfaEnrollment:start

The URL uses gRPC Transcoding syntax.

Request body

The request body contains data with the following structure:

JSON representation
{
  "idToken": string,
  "tenantId": string,
  "phoneEnrollmentInfo": {
    object (StartMfaPhoneRequestInfo)
  }
}
Fields
idToken

string

Required. User's ID token.

tenantId

string

The ID of the Identity Platform tenant that the user enrolling MFA belongs to. If not set, the user belongs to the default Identity Platform project.

phoneEnrollmentInfo

object (StartMfaPhoneRequestInfo)

Verification info to authorize sending an SMS for phone verification.

Response body

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

mfaEnrollment.start response.

JSON representation
{
  "phoneSessionInfo": {
    object (StartMfaPhoneResponseInfo)
  }
}
Fields
phoneSessionInfo

object (StartMfaPhoneResponseInfo)

Verification info to authorize sending an SMS for phone verification.

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.