Skip to content
Get Started

Totp

Store and retrieve TOTP codes for agent 2FA (authenticator app replacement)

Get current TOTP code
client.v2.totp.getCode(stringsecretID, RequestOptionsoptions?): TotpGetCodeResponse { code, expires_in, status }
GET/api/v2/totp/code/{secret_id}
ModelsExpand Collapse
TotpGetCodeResponse { code, expires_in, status }
code?: string

The current TOTP code

expires_in?: number

Seconds until this code rotates

status?: string

TotpSecrets

Store and retrieve TOTP codes for agent 2FA (authenticator app replacement)

Register a TOTP secret
client.v2.totp.secrets.create(SecretCreateParams { algorithm, digits, issuer, 4 more } body, RequestOptionsoptions?): SecretCreateResponse { status, totp_secret }
POST/api/v2/totp/secrets
List TOTP secrets
client.v2.totp.secrets.list(RequestOptionsoptions?): SecretListResponse { status, totp_secrets }
GET/api/v2/totp/secrets
Delete a TOTP secret
client.v2.totp.secrets.delete(stringsecretID, RequestOptionsoptions?): SecretDeleteResponse { status }
DELETE/api/v2/totp/secrets/{secret_id}
ModelsExpand Collapse
SecretCreateResponse { status, totp_secret }
status?: string
totp_secret?: TotpSecret { id, algorithm, created_at, 5 more }
id?: string

Unique identifier for this TOTP secret

formatuuid
algorithm?: "SHA1" | "SHA256" | "SHA512"

Hash algorithm used

One of the following:
"SHA1"
"SHA256"
"SHA512"
created_at?: string
digits?: number

Code length (6 or 8)

issuer?: string | null

Service name

label?: string

Human-readable label

period?: number

Rotation period in seconds

secret?: string

Base32 secret — only returned on creation, never on list/get

SecretListResponse { status, totp_secrets }
status?: string
totp_secrets?: Array<TotpSecret>
id?: string

Unique identifier for this TOTP secret

formatuuid
algorithm?: "SHA1" | "SHA256" | "SHA512"

Hash algorithm used

One of the following:
"SHA1"
"SHA256"
"SHA512"
created_at?: string
digits?: number

Code length (6 or 8)

issuer?: string | null

Service name

label?: string

Human-readable label

period?: number

Rotation period in seconds

secret?: string

Base32 secret — only returned on creation, never on list/get

SecretDeleteResponse { status }
status?: string