Platform API reference

Platform API · Me

post/v1/me/mfa/totpAuth

Start adding an authenticator app

Creates a pending TOTP factor (SHA-1, 6 digits, 30 s) and returns its secret, `otpauth://` URI and QR code. Confirm with a code to turn it on. Starting again replaces a pending one. Not idempotent and takes no `Idempotency-Key`: the answer carries a secret (an authenticator seed, a ceremony challenge or recovery codes) that a replay cache must not hold.

Request body

labelstring

Name for the factor (max 64).

Response · 200

factor_id*string · uuid

The pending factor; confirm it with a code.

secret*string

Base32 secret for manual entry. Shown once.

otpauth_uri*string

`otpauth://` URI for authenticator apps.

qr_data_url*string

PNG data URL of the QR code for `otpauth_uri`.

Example

Request

POST https://api.platform-auth.productcraft.co/v1/me/mfa/totp
Authorization: Bearer YOUR_TOKEN
Content-Type: application/json

{
  "label": "string"
}

Response

{
  "factor_id": "00000000-0000-0000-0000-000000000000",
  "secret": "string",
  "otpauth_uri": "string",
  "qr_data_url": "string"
}