Get migration OTP ID

This endpoint allows an authenticated user to get the OTP ID needed for email verification during the migration process.

NOTE: These docs are unfinished.

These docs were submitted to me by Beam.

Request

  • Method: POST
  • Endpoint: /twofactorauth/migration/otp
  • Full URL: https://api.minecraftservices.com/twofactorauth/migration/otp
  • Headers:
    • Authorization: Bearer [JWT/auth token here]
    • Content-Type: application/json

The POST body for this request should be similar to this:

{
  "emailAddress": "myminecraftemail@example.com" // current email of the Minecraft account
}

Response

201: Created

You have provided the correct email tied to the Minecraft account,

{
  "otpId": "40286434-276c-4ad0-abe2-9135ea945e7e" // just a sample OTP ID, it will change each time
}

403: Forbidden

You have provided an incorrect email in the JSON body, or the email you provided had an invalid format (did not fit Mojang's email address validation).

NOTE: There are other reasons to get this error, they will be added soon.

// incorrect email
{
  "path": "/twofactorauth/migration/otp",
  "error": "FORBIDDEN"
}

// invalid email format
{
  "path": "/twofactorauth/migration/otp",
  "errorType": "CONSTRAINT_VIOLATION",
  "error": "CONSTRAINT_VIOLATION",
  "errorMessage": "generateAndSendCode.userProvidedEmail.emailAddress: must be a well-formed email address"
}