{"uid":"cap_Yb54m0gqUjH4buh4Bc4vC","slug":"agent402-tools-totp-code-generator-f2742bc9","name":"agent402.tools TOTP Code Generator","description":"Compute the current TOTP code (RFC 6238, 30s period, SHA-1, 6 digits) from a base32 secret. Useful for agents that must complete 2FA flows they are authorized for.","url":"https://agent402.tools/api/totp","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"digits":{"type":"number","description":"6 (default) or 8"},"secret":{"type":"string","description":"Base32 TOTP secret"}}},"responseSchema":{"type":"json","example":{"code":"492039","secondsRemaining":17}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.002","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.002/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_fZTUAl7Bs8E1ziXdBeRWS","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Computes the current 6- or 8-digit TOTP one-time password from a base32 secret using RFC 6238 (30s period, SHA-1)","exampleAgentPrompt":"I need to log into a site that requires a 2FA code — compute the current 6-digit TOTP code from my base32 secret JBSWY3DPEHPK3PXP so I can paste it into the login form.","exampleUseCases":null,"resultDescription":"Returns the current TOTP one-time password (6 or 8 digits) valid for the current 30-second time window, derived from the provided base32 secret using RFC 6238 with SHA-1.","failureModes":["Invalid or malformed base32 secret returns an error","Unsupported digit count (not 6 or 8) may return an error or default behavior","Clock skew on either side may cause the code to be rejected by the target system","Missing secret field returns a validation error","Payment failure (x402) blocks execution"],"whenToPreferThis":"Use this endpoint when an AI agent needs to programmatically complete a TOTP-based 2FA challenge it is authorized to fulfill, especially in automated login or workflow automation scenarios where a software authenticator is needed without a physical device.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T19:14:03.348Z","isFirstParty":false}