语言
/v1/totp/validate
检查 TOTP 代码对于给定的共享密钥是否有效。 支持可配置的时间窗口来解决客户端和服务器之间的时钟偏差。
The TOTP code to validate.
The Base32-encoded shared secret.
Time step in seconds.
Number of periods before and after the current one to accept (for clock skew).
curl -X POST https://api.botoi.com/v1/totp/validate \ -H "Content-Type: application/json" \ -d '{"code":"482937","secret":"JBSWY3DPEHPK3PXP","period":30,"window":1}'
用户在登录期间输入其 TOTP 代码后,在授予访问权限之前,根据其存储的机密在服务器端进行验证。
在集成测试中生成并验证 TOTP 代码,以验证您的 2FA 中间件拒绝过期或不正确的代码。
Free tier includes 5 requests per minute with no credit card required. Upgrade for higher limits.