{"uid":"cap_BtZ7OctOQRjFAxw6qQckY","slug":"geekvault-totp-code-generator-abf3b0b3","name":"GeekVault TOTP Code Generator","description":"Network, docs, image, web, and dev utility tools paid per call via x402. No signup, no API keys, no subscriptions — just USDC on Base.","url":"https://api.geekvault.dev/dev-tools/v1/totp?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","required":["secret"],"properties":{"algo":{"type":"string","description":"Algoritmo de hash. Default: `sha1`."},"digits":{"type":"string","description":"Cantidad de dígitos del código (6-8). Default: 6."},"period":{"type":"string","description":"Período en segundos (15-300). Default: 30."},"secret":{"type":"string","description":"Secreto Base32 RFC4648 (formato Google Authenticator)."}}},"responseSchema":{"type":"object","required":["code","period","valid_for_seconds"],"properties":{"code":{"type":"string"},"period":{"type":"integer","format":"int64","minimum":0},"valid_for_seconds":{"type":"integer","format":"int64","minimum":0}}},"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_OD07ZKO2Cq6eSnUtRUdcK","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":"Generates a TOTP (Time-based One-Time Password) code from a Base32 secret, returning the current code and its remaining validity window.","exampleAgentPrompt":"Generate the current TOTP code for my Google Authenticator secret JBSWY3DPEHPK3PXP using SHA-1, 6 digits, and a 30-second period.","exampleUseCases":[{"title":"Automated 2FA login in CI pipeline","prompt":"I need the current TOTP one-time password for my service account — the Base32 secret is JBSWY3DPEHPK3PXP, SHA-1 hash, 6 digits, 30-second window. My deployment script needs it to log in automatically."},{"title":"MFA code for agent-driven account access","prompt":"Can you get the current 2FA code from this authenticator secret: MFRGGZDFMZTWQ2LK? It uses SHA-1, outputs 6 digits, and rotates every 30 seconds. I need it to complete a login flow."},{"title":"Custom TOTP with 8 digits and 60-second period","prompt":"Generate a TOTP code using my secret KRUGKIDROVUWG2ZA but with 8 digits and a 60-second rotation period instead of the defaults — using SHA-1."}],"resultDescription":"Returns a JSON object with three fields: 'code' (the current TOTP string, e.g. '482910'), 'period' (the configured period in seconds), and 'valid_for_seconds' (how many seconds remain before this code expires and rotates).","failureModes":["Invalid or malformed Base32 secret returns an error — secret must conform to RFC4648 Base32 encoding","Digits parameter outside 6-8 range may be rejected","Period parameter outside 15-300 range may be rejected","Unsupported hash algorithm value returns an error","Payment failure via x402 returns 402 status before the TOTP is computed"],"whenToPreferThis":"Use this endpoint when an AI agent needs to programmatically generate TOTP codes for automated authentication flows — such as CI/CD pipelines, test suites, or agentic login sequences — without requiring a phone or authenticator app. Ideal for headless automation where a Base32 secret is already known. Prefer this over rolling your own TOTP implementation when you want a pay-per-call, no-credential approach via x402/USDC.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-27T12:59:46.647Z","isFirstParty":false,"canonicalSlug":"geekvault-totp-code-generator-abf3b0b3"}