AuthTOTP
Verify TOTP code and complete the login process. This endpoint is used after initial login when TOTP is required.
Authorizations
Body
temp_tokenstringRequiredExample:
Temporary token received from initial login
eyJ0eXA...
tokenstringRequiredExample:
TOTP verification code
123456
Responses
200
The TOTP verification was successful and login is completed.
application/json
400
Required field(s) are missing, data is invalid, or the action is not allowed.
application/json
401
Unauthorized Access
application/json
403
Forbidden
post
POST /api/v1/auth/totp/verify/ HTTP/1.1
Host: sandbox.akinon.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 44
{
"temp_token": "eyJ0eXA...",
"token": "123456"
}
{
"key": "a46ba..."
}
Setup TOTP authentication.
Authorizations
Responses
201
The TOTP setup was successful.
application/json
400
Required field(s) are missing, data is invalid, or the action is not allowed.
application/json
403
Forbidden
post
POST /api/v1/auth/totp/setup/ HTTP/1.1
Host: sandbox.akinon.com
Authorization: YOUR_API_KEY
Accept: */*
{
"secret_key": "RE4U7XXXXXXXXXXXX",
"provisioning_uri": "otpauth://totp/Omnitron%3Aakinon?secret=RE4U7XXXXXXXXXXXX&algorithm=SHA1&digits=6&period=30&issuer=Omnitron"
}
Activate TOTP authentication by verifying the TOTP code.
Authorizations
Body
tokenstringRequiredExample:
TOTP verification code
123456
Responses
200
The TOTP activation was successful.
application/json
400
Required field(s) are missing, data is invalid, or the action is not allowed.
application/json
403
Forbidden
post
POST /api/v1/auth/totp/activate/ HTTP/1.1
Host: sandbox.akinon.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 18
{
"token": "123456"
}
{
"recovery_codes": [
"ABCD1234"
]
}
Deactivate TOTP authentication for the current user.
Authorizations
Responses
200
The TOTP deactivation was successful.
400
Required field(s) are missing, data is invalid, or the action is not allowed.
application/json
403
Forbidden
post
POST /api/v1/auth/totp/deactivate/ HTTP/1.1
Host: sandbox.akinon.com
Authorization: YOUR_API_KEY
Accept: */*
No content
Was this helpful?