Complete login with TOTP or recovery code
POST
/api/v1/auth/login/verify-2fa
const url = 'https://api.totalview.energy/api/v1/auth/login/verify-2fa';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"mfa_token":"example","totp_code":"example","recovery_code":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.totalview.energy/api/v1/auth/login/verify-2fa \ --header 'Content-Type: application/json' \ --data '{ "mfa_token": "example", "totp_code": "example", "recovery_code": "example" }'Verify TOTP code or recovery code to complete 2FA login.
Request Body required
Section titled “Request Body required ”Responses
Section titled “ Responses ”Successful Response
Media type application/json
Example generated
exampleValidation Error
Media type application/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
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": {} } ]}