OTP

Generate OTP Code

get
/otp/generate

Generate a current Time-Based One-Time Password (TOTP) code using the provided base32 secret.

This endpoint is public — no authentication required. The caller must supply a valid base32-encoded TOTP secret (e.g., from an authenticator app setup). Returns the current 6-digit OTP and its remaining validity period.

Authorizations
apiKeystringRequired

Your DM Champ API key. Obtain from Settings → API Keys.

Query parameters
secretstringRequired

Base32-encoded TOTP secret key

Example: JBSWY3DPEHPK3PXP
Responses
chevron-right
200

OTP generated successfully

application/json

OTP generation response

successbooleanOptionalExample: true
current_otpstringOptional

Current 6-digit TOTP code

Example: 123456
expires_inintegerOptional

Seconds until the current code expires (0-30)

Example: 15
get
/otp/generate

OTP Generator Interface

get
/otp

Serves an interactive HTML page for generating and viewing TOTP codes in the browser.

This endpoint is public — no authentication required. The caller must supply a valid base32-encoded TOTP secret via the secret query parameter. The page auto-refreshes the code every 30 seconds and shows a countdown timer.

Authorizations
apiKeystringRequired

Your DM Champ API key. Obtain from Settings → API Keys.

Query parameters
secretstringRequired

Base32-encoded TOTP secret key

Example: JBSWY3DPEHPK3PXP
Responses
chevron-right
200

HTML OTP generator interface

text/html
stringOptional

Interactive HTML page with auto-refreshing TOTP display

get
/otp

Last updated

Was this helpful?