TOTP Generator API

POST

Produce standard one-time passwords from any Base32 secret.

TOTP Generator creates time-based one-time passwords compatible with authenticator apps using standard TOTP algorithms.

Try it — live request, no key required

Request
POSTapi.apiverve.com/v1/totpgenerator
Body
Verification
Format

No key required to try it. Get a key to use it in your app.

Example
{
  "status": "ok",
  "error": null,
  "data": {
    "token": "935324",
    "digits": 6,
    "period": 30,
    "timeRemaining": 25,
    "expiresAt": "2025-12-16T22:31:00Z"
  }
}

About the TOTP Generator API

Provides token expiration tracking and remaining time information, compatible with Google Authenticator and other TOTP applications.

What people use it for

2FA Implementation
Implement two-factor authentication systems with TOTP token generation
Authentication Testing
Test TOTP-based authentication flows in development and QA environments
Security Integration
Integrate time-based one-time passwords into security workflows
MFA Systems
Build multi-factor authentication systems with standardized TOTP tokens

Ways to call it

One endpoint, many ways in — REST with JSON, XML, YAML and CSV, plus GraphQL and an MCP interface for AI agents.

JSON
Default REST response
XML
Markup format
YAML
Human-readable
CSV
Tabular export
Beta
GraphQL
Query language
New
MCP
For AI agents

Other ways to use TOTP Generator

Same data, same APIVerve account, same credit balance — one key works on all of them.

Questions.

Common questions about the TOTP Generator API.

Read the docs →
How many tokens does the Free plan cover?
The Free plan provides 200 credits each month, covering 100 token generations at 2 credits per request. Paid usage on the Starter plan works out to about $0.30 per 1,000 calls, providing up to 100,000 tokens per month. There are no overage fees if credits run out.
Do I get token expiration timestamps on the Free plan?
No. The Free plan generates the token and returns the configured digit count and period. The exact expiration timestamp and the count of seconds remaining are premium fields available on any paid subscription.
Is the generated token compatible with Google Authenticator?
Yes. TOTP Generator builds tokens using standard time-based one-time password algorithms, making them fully compatible with Google Authenticator and other TOTP-compliant apps.
Can I configure custom token lengths and time periods?
Yes. You can optionally specify the number of digits for the output code and set a custom validity window in seconds to match your system requirements.
What format does the shared secret require?
The secret parameter must be provided as a Base32-encoded string, which is the standard encoding used in two-factor authentication provisioning.

Ready to build with TOTP Generator? Start with 200 free credits — one key unlocks all 300+ APIs.

Explore the catalog

300+ APIs on the same key and the same response shape.

Browse all APIs