2FA

Generate a TOTP code

post/2fa

Request

  • Base URL
    https://dummyjson.com
  • URL
    https://dummyjson.com/2fa
  • Auth
    none required

Request body

keystring required

Base32 secret or otpauth:// URI

Example request

{
  "key": "JBSWY3DPEHPK3PXP"
}

Response

TOTP payload

totpstring
expiresIninteger
periodinteger

Example response

{
  "totp": "123456",
  "expiresIn": 25,
  "period": 30
}

Changes

No recorded changes to this operation across all 1 revision of this API.