AuthTOTP

Verify TOTP

post

Verify TOTP code and complete the login process. This endpoint is used after initial login when TOTP is required.

Authorizations
Body
temp_tokenstringRequired

Temporary token received from initial login

Example: eyJ0eXA...
tokenstringRequired

TOTP verification code

Example: 123456
Responses
200
The TOTP verification was successful and login is completed.
application/json
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

post

Setup TOTP authentication.

Authorizations
Responses
201
The TOTP setup was successful.
application/json
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

post

Activate TOTP authentication by verifying the TOTP code.

Authorizations
Body
tokenstringRequired

TOTP verification code

Example: 123456
Responses
200
The TOTP activation was successful.
application/json
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

post

Deactivate TOTP authentication for the current user.

Authorizations
Responses
200
The TOTP deactivation was successful.
post
POST /api/v1/auth/totp/deactivate/ HTTP/1.1
Host: sandbox.akinon.com
Authorization: YOUR_API_KEY
Accept: */*

No content

Was this helpful?