Skip to main content
PUT
/
v2
/
databases
/
{database}
/
auth
/
mfa
Complete an MFA challenge
curl --request PUT \
  --url https://api.example.com/v2/databases/{database}/auth/mfa \
  --header 'Content-Type: application/json' \
  --cookie nile-auth.session-token= \
  --data '
{
  "token": "<string>",
  "code": "<string>"
}
'
{
  "ok": true,
  "scope": "challenge"
}

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)

Body

application/json
token
string
required

Base64URL encoded MFA challenge token issued during login or setup.

code
string
required

Time-bound one time passcode (email OTP or authenticator TOTP) that proves possession of the second factor.

Response

MFA challenge was satisfied.

ok
boolean
required

Indicates that the MFA challenge was satisfied.

scope
enum<string>
required

Identifies whether the challenge corresponded to a login flow or an MFA setup flow.

Available options:
challenge,
setup