Skip to main content
GET
/
v1
/
vault
/
{key}
/
totp
Get TOTP Code
curl --request GET \
  --url https://api.bctrl.ai/v1/vault/{key}/totp \
  --header 'Authorization: Bearer <token>'
{
  "code": "<string>"
}
key
string
required
Credential key with a stored TOTP secret.

Examples

const code = await vault.totp('github');
console.log(code); // '482916'

Response

code
string
required
Current 6-digit TOTP code.
Response Example
"482916"

Errors

CodeDescription
404Credential not found
400Credential has no TOTP secret configured