{"uid":"cap_L8SbyHaKTYKTkxAngMkGZ","slug":"openverbs-hotp-generator-0a250615","name":"OpenVerbs HOTP Generator","description":"Generate an RFC 4226 counter-based HMAC one-time password from a base32 secret and counter. Configurable digits (6–10, default 6) and algorithm (SHA1/SHA256/SHA512, default SHA1). An invalid base32 secret is a clean 400.","url":"https://otp.openverbs.com/v1/hotp","method":"POST","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method","bodyType","body"],"properties":{"body":{"type":"object","required":["secret","counter"],"properties":{"digits":{"type":"integer","maximum":10,"minimum":6,"description":"Number of code digits. Default 6."},"secret":{"type":"string","maxLength":1024,"minLength":1,"description":"Base32-encoded shared secret."},"counter":{"type":"integer","minimum":0,"description":"The HOTP counter value."},"algorithm":{"enum":["SHA1","SHA256","SHA512"],"type":"string","description":"HMAC algorithm. Default SHA1."}},"additionalProperties":false},"type":{"type":"string","const":"http"},"method":{"enum":["POST"],"type":"string"},"bodyType":{"enum":["json","form-data","text"],"type":"string"}},"additionalProperties":false}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.004","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.004/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.004","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.004","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_HBlvt_K_Luk-kv8DxX7kP","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.004","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Generates an RFC 4226 counter-based HMAC one-time password (HOTP) from a base32 secret and counter value","exampleAgentPrompt":"Generate an RFC 4226 counter-based one-time password using my base32 secret JBSWY3DPEHPK3PXP and counter value 7, with 8 digits and SHA256.","exampleUseCases":[{"title":"Hardware token OTP emulation","prompt":"I need to emulate a hardware HOTP token — generate a 6-digit code from my base32 secret JBSWY3DPEHPK3PXP at counter value 42 using SHA1."},{"title":"High-security 10-digit HOTP","prompt":"Generate a 10-digit counter-based one-time password from secret MFRGGZDFMZTWQ2LK at counter 100 using SHA512 for our high-assurance login system."},{"title":"Automated HOTP sequence for testing","prompt":"Produce an HOTP code for counter value 0 using base32 secret ORSXG5A and the default 6 digits and SHA1 algorithm, so I can verify my HOTP implementation is correct."}],"resultDescription":"Returns the computed HOTP code as a string of digits (6–10 digits depending on configuration), derived via HMAC using the specified algorithm applied to the counter and secret. Invalid base32 secrets return a 400 error.","failureModes":["Invalid or malformed base32 secret returns HTTP 400","Counter value below 0 is rejected","Digit count outside 6–10 range is rejected","Unsupported algorithm value returns validation error","Missing required fields (secret or counter) returns error"],"whenToPreferThis":"Choose this endpoint when you need RFC 4226-compliant HOTP codes (counter-based, not time-based). Prefer it over TOTP when the consuming system uses a counter that you control (e.g. hardware tokens, offline OTP sequences, or deterministic test vectors). If you need time-based codes, use the sibling TOTP endpoint instead.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T18:30:24.222Z","isFirstParty":false}