Docs / API: Account
Link Telegram
Returns a bot link that works for 15 minutes. Open it and press Start to link a private chat. Answers 503 until the bot is connected.
POST/api/v1/account/telegram
| Property | Value |
|---|---|
| Authentication | Needs a wallet session. Sign in at the console. |
| Rate-limit cost | 0 units |
| Status | Live |
#Request
curl -s -X POST "https://farbeamlabs.com/api/v1/account/telegram"const res = await fetch("https://farbeamlabs.com/api/v1/account/telegram", {
method: "POST"
});
const { data, meta, error } = await res.json();
if (error) throw new Error(`${error.code}: ${error.message}`);
console.log(data);import os, requests
res = requests.post(
"https://farbeamlabs.com/api/v1/account/telegram",
timeout=30,
)
body = res.json()
if "error" in body:
raise RuntimeError(body["error"]["code"])
print(body["data"])#Errors
| HTTP | Code | Meaning |
|---|---|---|
| 401 | sign_in_required | Sign in with a wallet first. |
| 503 | telegram_not_configured | Telegram delivery is not connected yet. |
All errors share one format. See errors.