跳到内容
Esc
↑↓导航↵打开⌘J预览

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
授权
AuthorizationBearer 令牌 · header必填

A BillionSend API key (bs_…).

路径参数
inbox_idstring必填

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

查询参数
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)

最小值 0 · 最大值 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

最小值 60 · 最大值 86400
sincestring<date-time>

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

响应
200

The latest code, or a status saying why none

objectstring必填
允许值:verification_code
statusstring必填
允许值:foundnoneambiguoustimeout
kindstring | null必填
允许值:otplinknull
codestring | null必填
urlstring | null必填
link_domain_matches_senderboolean | null必填
email_idstring<uuid> | null必填
fromstring | null必填
received_atstring | null必填
sender_truststring | null必填
允许值:ownerallowlistedknown_threadexternalunauthenticatedfailednull
401

Missing, malformed, unknown or revoked API key

statusCodenumber必填
namestring必填
messagestring必填
404

Not found

statusCodenumber必填
namestring必填
messagestring必填
422

Validation error

statusCodenumber必填
namestring必填
messagestring必填
429

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

statusCodenumber必填
namestring必填
messagestring必填
试一试
服务器
授权
参数
请求
curl -X GET 'https://api.billionsend.com/inboxes/string/codes/latest' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json'
响应
{
  "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"
}

这个页面有帮助吗?