API reference · Bots
List report tokens
GET/v1/bot-tokens
Your live report tokens, without their secrets.
On this page
Auth. An account token (Authorization: Bearer lb_…) or a signed-in web session. A report-only token (lbr_…) is refused here with 403 scope_denied.
Limits. Counts against your plan's API requests (60, 600 or 3,000 a minute on Free, Builder and Standard).
Request
curl "https://api.langbot.ai/v1/bot-tokens" \
-H "Authorization: Bearer $LANGBOT_API_TOKEN"from langbot import LangbotClient
async with LangbotClient() as lb: # reads LANGBOT_API_TOKEN
for t in await lb.bots.tokens():
print(t["prefix"], t["bot_id"], t["last_used_at"])import { LangbotClient } from "@langbotai/sdk";
const lb = new LangbotClient(); // reads LANGBOT_API_TOKEN
const tokens = await lb.bots.tokens();Response
200 OK
{
"tokens": [
{
"id": "btk_01M6G72RG0GPK193NWY0YFFVEZ",
"name": "laptop",
"bot_id": "bot_01M6G72RFQRQ8JGNG8T1447GGP",
"scope": "bot:report",
"prefix": "lbr_sfdD",
"created_at": 1793693147648,
"last_used_at": null
}
]
}Errors
| Status | code | When |
|---|---|---|
| 401 | auth_required | No token was sent. |
| 401 | token_invalid | The token was not recognised (mistyped, revoked or expired). |
| 429 | rate_limited | Over your request budget; wait Retry-After seconds. |
Every error body is {"detail": …, "code": "…"}; branch on code. All codes: Errors.