Skip to main content

TOTP API

Download OpenAPI (YAML)Version v1

Base URL: https://localhost:9443/t/<TENANT_DOMAIN>/api/users/v1

The TOTP API Definition (version v1).

Download the OpenAPI definition (YAML)

Security schemes​

OAuth2: oauth2

authorizationCode flow, token URL https://localhost:9443/oauth2/token, authorization URL https://localhost:9443/oauth2/authorize

me​

Operations for the authenticated user.

Retrieve the QR Code URL of the authenticated user​

GET /me/totp

This API is used to retrieve the QR code URL of the authenticated user.

Scope(Permission) required: internal_login

Responses

CodeDescriptionSchema
200

OK

TOTPResponse
401

Unauthorized

403

Resource Forbidden

500

Server Error

Error

Refresh, validate the QR code URL​

POST /me/totp

This API is used to perform following actions.

  • INIT- Generate TOTP QR code URL for the authenticated user
  • REFRESH - Refresh TOTP secret key of the authenticated user
  • VALIDATE - Validate the user entered verification code

Scope(Permission) required: internal_login

Request body (required): application/json

Actions supported by the API. Actions can be INIT, VALIDATE or REFRESH

Schema: UserRequest

2 properties
NameTypeRequiredDescription
actionstringYes

Allowed values: INIT, REFRESH, VALIDATE

verificationCodeinteger

Responses

CodeDescriptionSchema
200

TOTP secret successfully refreshed

201

Created

TOTPResponse
400

Bad Request

Error
401

Unauthorized

403

Resource Forbidden

409

Conflict

Error
500

Server Error

Error

Resets TOTP credentials of the authenticated user​

DEL /me/totp

This API is used to delete the TOTP credentials of the authenticated user.

Scope(Permission) required: internal_login

Responses

CodeDescriptionSchema
200

Credentials deleted successfully

401

Unauthorized

403

Resource Forbidden

500

Server Error

Error

Retrieve the TOTP secret of the authenticated user​

GET /me/totp/secret

This API is used to retrieve the TOTP secret of the authenticated user.

Scope(Permission) required: internal_login

Responses

CodeDescriptionSchema
200

OK

TOTPSecretResponse
401

Unauthorized

403

Resource Forbidden

500

Server Error

Error

Schemas​

Error​

Type: object

4 properties
NameTypeRequiredDescription
codestringYes
messagestringYes
descriptionstring
traceIdstring

UserRequest​

Type: object

2 properties
NameTypeRequiredDescription
actionstringYes

Allowed values: INIT, REFRESH, VALIDATE

verificationCodeinteger

TOTPResponse​

Type: object

2 properties
NameTypeRequiredDescription
qrCodeUrlstring

QR Code URL for the authenticated user

isValidboolean

Secret key of the authenticated user

TOTPSecretResponse​

Type: object

1 property
NameTypeRequiredDescription
secretstring

Refreshed TOTP secret key of the authenticated user

Was this page helpful?