Saltar al contenido
Esc
↑↓navegar↵abrir⌘Jvista previa

Get latest code

BillionSend extension: the newest code or sign-in link in delivered mail, never from held mail or senders that failed authentication; links are never fetched. max_age counts from delivery, so a code released from quarantine counts from its release; since skips mail received at or before it, so a second sign-in waits for its own code. wait > 0 long-polls until one arrives (status timeout when none did). Always 200; status none when there is nothing.

GET/inboxes/{inbox_id}/codes/latest
Autorización
AuthorizationToken Bearer · headerobligatorio

A BillionSend API key (bs_…).

Parámetros de ruta
inbox_idstringobligatorio

The inbox ID or its email address, such as support@example.com

Parámetros de consulta
fromstring

An exact sender address, or a domain covering itself and its subdomains

waitinteger

Seconds to wait for a code to arrive, 0-50 (default 0)

mín. 0 · máx. 50
max_ageinteger

How long ago the code may have reached the inbox, in seconds, 60-86400 (default 600); a released code counts from its release

mín. 60 · máx. 86400
sincestring<date-time>

Only mail received after this ISO 8601 instant, such as the received_at of a code already used

Respuestas
200

The latest code, or a status saying why none

objectstringobligatorio
Valores permitidos:verification_code
statusstringobligatorio
Valores permitidos:foundnoneambiguoustimeout
kindstring | nullobligatorio
Valores permitidos:otplinknull
codestring | nullobligatorio
urlstring | nullobligatorio
link_domain_matches_senderboolean | nullobligatorio
email_idstring<uuid> | nullobligatorio
fromstring | nullobligatorio
received_atstring | nullobligatorio
sender_truststring | nullobligatorio
Valores permitidos:ownerallowlistedknown_threadexternalunauthenticatedfailednull
401

Missing, malformed, unknown or revoked API key

statusCodenumberobligatorio
namestringobligatorio
messagestringobligatorio
404

Not found

statusCodenumberobligatorio
namestringobligatorio
messagestringobligatorio
422

Validation error

statusCodenumberobligatorio
namestringobligatorio
messagestringobligatorio
429

Too many waits at once, or the rate limit (rate_limit_exceeded, with Retry-After)

statusCodenumberobligatorio
namestringobligatorio
messagestringobligatorio
Pruébalo
Servidor
Autorización
Parámetros
Solicitud
curl -X GET 'https://api.billionsend.com/inboxes/string/codes/latest' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json'
Respuesta
{
  "object": "verification_code",
  "status": "found",
  "kind": "otp",
  "code": "string",
  "url": "string",
  "link_domain_matches_sender": true,
  "email_id": "8e6bf5ae-e456-4654-87f8-33e2156caffc",
  "from": "string",
  "received_at": "string",
  "sender_trust": "owner"
}

¿Te ha resultado útil esta página?