Skip to content
Get Started

List TOTP secrets

client.v2.totp.secrets.list(RequestOptionsoptions?): SecretListResponse { status, totp_secrets }
GET/api/v2/totp/secrets

List all stored TOTP secrets for the account. The encrypted secret values are never returned.

ReturnsExpand Collapse
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

List TOTP secrets

import SendblueAPI from 'sendblue';

const client = new SendblueAPI({
  apiKey: process.env['SENDBLUE_API_API_KEY'], // This is the default and can be omitted
  apiSecret: process.env['SENDBLUE_API_API_SECRET'], // This is the default and can be omitted
});

const secrets = await client.v2.totp.secrets.list();

console.log(secrets.status);
{
  "status": "OK",
  "totp_secrets": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "algorithm": "SHA1",
      "created_at": "2026-04-05T12:00:00Z",
      "digits": 6,
      "issuer": "GitHub",
      "label": "GitHub - [email protected]",
      "period": 30,
      "secret": "JBSWY3DPEHPK3PXP"
    }
  ]
}
Returns Examples
{
  "status": "OK",
  "totp_secrets": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "algorithm": "SHA1",
      "created_at": "2026-04-05T12:00:00Z",
      "digits": 6,
      "issuer": "GitHub",
      "label": "GitHub - [email protected]",
      "period": 30,
      "secret": "JBSWY3DPEHPK3PXP"
    }
  ]
}