{"uid":"cap_F6xJgWIyI6Eyk_EKYb-Dm","slug":"util-beauty-totp-code-generator-ff836441","name":"util.beauty TOTP Code Generator","description":"Metered web utilities for developers and AI agents: browser screenshot and PDF, crypto, DNS and net tools. Pay per request with x402 (USDC on Base) or prepaid API keys.","url":"https://util.beauty/v1/crypto/totp","method":"POST","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"input":{"type":"object","properties":{"body":{"type":"object","description":"JSON request body (see OpenAPI for the utility schema).","additionalProperties":true}}},"output":{"type":"object","properties":{"example":{"type":"object","properties":{"ok":{"type":"boolean"},"utility":{"type":"string"},"requestId":{"type":"string"},"chargedCredits":{"type":"number"}},"additionalProperties":true}}}}},"responseSchema":{"type":"json","example":{"ok":true,"utility":"…","requestId":"req_…","chargedCredits":1}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","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.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_Y3qAsrU564lYlRMupjMH7","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Generates a time-based one-time password (TOTP) code from a given secret, useful for 2FA workflows in automated or agent-driven scenarios.","exampleAgentPrompt":"Generate the current TOTP code for my authenticator secret JBSWY3DPEHPK3PXP — I need the 6-digit code to log into my account right now.","exampleUseCases":[{"title":"Automated 2FA login in CI/CD pipeline","prompt":"I need to log into a service that requires 2FA during our automated deployment. Can you generate the current TOTP code from the secret JBSWY3DPEHPK3PXP so the script can complete the login?"},{"title":"Testing MFA flows in a staging environment","prompt":"I'm testing our MFA login flow in staging and need a fresh TOTP code generated from the base32 secret MFRGGZDFMZTWQ2LK to simulate a user completing authentication."},{"title":"Agent-driven account access for scheduled tasks","prompt":"My agent needs to log into the admin dashboard every morning at 9am — can you compute the TOTP one-time password from secret KRUGS4ZANFZSA2LT so it can authenticate automatically?"}],"resultDescription":"Returns a JSON object with a boolean 'ok' status, the generated TOTP code under 'utility', a unique 'requestId' string for tracking, and a 'chargedCredits' number indicating how many prepaid credits were consumed for this request.","failureModes":["Invalid or malformed TOTP secret causes a 400 error","Expired or missing payment (x402) results in a 402 Payment Required response","Unsupported algorithm or digit count in request body returns a validation error","Network timeout or server error returns a 500 response with no TOTP code","Insufficient prepaid API key credits results in a payment failure error"],"whenToPreferThis":"Choose this endpoint when you need programmatic, pay-per-use TOTP code generation without running your own OTP library — especially useful in AI agent workflows, CI/CD pipelines, or serverless environments where installing a crypto dependency is impractical. It supports x402 micropayments (USDC on Base), making it ideal for agents that autonomously manage payments without subscription overhead.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T06:40:46.676Z","isFirstParty":false}