Skip to main content
POST
/
v2
/
databases
/
{database}
/
auth
/
mfa
Initiate MFA setup
curl --request POST \
  --url https://api.example.com/v2/databases/{database}/auth/mfa \
  --cookie nile-auth.session-token=
{
  "ok": true,
  "method": "authenticator",
  "token": "<string>",
  "expiresAt": "2023-11-07T05:31:56Z",
  "scope": "setup",
  "otpauthUrl": "<string>",
  "secret": "<string>",
  "maskedEmail": "<string>"
}

Authorizations

nile-auth.session-token
string
cookie
required

Session token stored in a cookie after user signs in, prefixed with __Secure if on https

Path Parameters

database
string
required

The string (id or name, depending on the credentials)

Response

MFA setup challenge created.

ok
boolean
required
method
enum<string>
required
Available options:
authenticator,
email
token
string
required
expiresAt
string<date-time>
required
scope
enum<string>
required
Available options:
setup
otpauthUrl
string

Present when the user is enrolling an authenticator app.

secret
string

Base32 secret returned for authenticator enrollment.

maskedEmail
string

Masked email address used for email OTP delivery.