Skip to content

Generate OTP from shared secret

POST
/api/devices/otp

Generate a current one-time password from a Base32 shared secret without saving a device. Optionally wait for the next TOTP period when the current code is too close to expiry.

Authorizations

ApiKey
Type
API Key (header: X-Api-Key)

Request Body

application/json
JSON
{
  
"shared_secret": "JBSWY3DPEHPK3PXP",
  
"min_seconds_until_expire": 10
}

Responses

application/json
JSON
{
  
"code": "123456",
  
"expires": "2026-05-18T12:00:30.000Z"
}

Playground

Server
Authorization
Body

Samples

Powered by VitePress OpenAPI