{"openapi":"3.1.0","info":{"title":"LittleFox 2FA API","version":"1.0.0","description":"Public TOTP API. No API key required. Secrets are accepted in JSON request bodies only. Limit: 120 requests/minute per IP; shared capacity limits also apply"},"servers":[{"url":"https://littlefox-api.ru"}],"paths":{"/2FA/api":{"post":{"summary":"Generate current and next TOTP codes","operationId":"generateTotp","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["secret"],"additionalProperties":false,"properties":{"secret":{"type":"string","maxLength":4096,"description":"Base32 secret or otpauth://totp URI","example":"GEZDGNBVGY3TQOJQGEZDGNBVGY3TQOJQ"}}}}}},"responses":{"200":{"description":"Codes generated","headers":{"Cache-Control":{"schema":{"type":"string","const":"no-store, max-age=0"}}},"content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"const":true},"data":{"type":"object","required":["otp","timeRemaining","period","nextOtp"],"properties":{"otp":{"type":"string","pattern":"^(?:[0-9]{6}|[0-9]{8})$"},"nextOtp":{"type":"string","pattern":"^(?:[0-9]{6}|[0-9]{8})$"},"timeRemaining":{"type":"integer","minimum":1,"maximum":3600},"period":{"type":"integer","minimum":5,"maximum":3600}}}}}}}},"400":{"description":"JSON error response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}}}}}}},"405":{"description":"JSON error response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}}}}}}},"408":{"description":"JSON error response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}}}}}}},"413":{"description":"JSON error response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}}}}}}},"415":{"description":"JSON error response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}}}}}}},"429":{"description":"JSON error response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}}}}}},"headers":{"Retry-After":{"schema":{"type":"integer","minimum":1}}}},"500":{"description":"JSON error response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}}}}}}}}}}}}