TOTP API
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
| Code | Description | Schema |
|---|---|---|
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
| Name | Type | Required | Description |
|---|---|---|---|
action | string | Yes | Allowed values: |
verificationCode | integer |
Responses
| Code | Description | Schema |
|---|---|---|
200 | TOTP secret successfully refreshed | |
201 | Created | TOTPResponse |
400 | Bad Request | Error |
401 | Unauthorized | |
403 | Resource Forbidden | |
409 | Conflict | Error |
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
| Code | Description | Schema |
|---|---|---|
200 | OK | TOTPSecretResponse |
401 | Unauthorized | |
403 | Resource Forbidden | |
500 | Server Error | Error |
Schemas
Error
Type: object
4 properties
| Name | Type | Required | Description |
|---|---|---|---|
code | string | Yes | |
message | string | Yes | |
description | string | ||
traceId | string |
UserRequest
Type: object
2 properties
| Name | Type | Required | Description |
|---|---|---|---|
action | string | Yes | Allowed values: |
verificationCode | integer |
TOTPResponse
Type: object
2 properties
| Name | Type | Required | Description |
|---|---|---|---|
qrCodeUrl | string | QR Code URL for the authenticated user | |
isValid | boolean | Secret key of the authenticated user |
TOTPSecretResponse
Type: object
1 property
| Name | Type | Required | Description |
|---|---|---|---|
secret | string | Refreshed TOTP secret key of the authenticated user |
Was this page helpful?