Skip to main content
POST
Validate a TOTP code

Authorizations

x-portal-auth-environment-id
string
header
required

The Auth Environment ID for the environment you are authenticating against. Find it in the Portal dashboard under Authentication > Configure.

Authorization
string
header
required

The userJwt returned by a magic link or OAuth validation when the environment requires two-factor authentication. Single use.

Body

application/json
code
string
required

The six-digit code from the user's authenticator app.

userJwt
string

The userJwt for this sign-in. Optional, and only needed if you are not sending it as a Bearer token in the Authorization header.

Response

TOTP code validated successfully

data
object
metadata
object | null

Always null for this endpoint.