POST
/
sdk
/
{environmentId}
/
users
/
mfa
/
register
/
totp
curl --request POST \
  --url https://app.dynamicauth.com/api/v0/sdk/{environmentId}/users/mfa/register/totp \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "type": "totp",
  "code": "<string>"
}'
{
  "type": "totp",
  "verified": true,
  "id": "95b11417-f18f-457f-8804-68e361f9164f",
  "createdAt": "2023-11-07T05:31:56Z",
  "verifiedAt": "2023-11-07T05:31:56Z",
  "default": true,
  "alias": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

environmentId
string
required

ID of the environment

Required string length: 36

Body

application/json
totp code
type
enum<string>
required
Available options:
totp,
passkey
code
string
required

The TOTP code generated by the user

Response

200
application/json
Successful operation
type
enum<string>
Available options:
totp,
passkey
verified
boolean

Whether or not the user has a verified this MFA Device

id
string
Required string length: 36
createdAt
string

The date and time the MFA device was created

verifiedAt
string | null

The date and time the MFA device was verified

default
boolean

Whether or not this is the default MFA device for the user

alias
string

The optional alias for the MFA device