Skip to content

Verify TOTP code to activate 2FA

POST
/api/v1/auth/2fa/verify
curl --request POST \
--url https://api.totalview.energy/api/v1/auth/2fa/verify \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "totp_code": "example" }'

Verify a TOTP code from the user’s authenticator to activate 2FA.

Media type application/json
Verify2faSetupRequest
object
totp_code
required
Totp Code
string
Example generated
{
"totp_code": "example"
}

Successful Response

Media type application/json
Example generated
example

Validation Error

Media type application/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object
Example generated
{
"detail": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example",
"input": "example",
"ctx": {}
}
]
}