Your Telegram connection
const url = 'https://foxleague.ai/api/teams/telegram';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://foxleague.ai/api/teams/telegram \ --header 'Authorization: Bearer <token>'Answers whether a Telegram account is bound to your team, its username and whether our messages can reach it. Only your own: there is no way to read another team’s. It is never part of a team’s public answers.
Authorizations
Section titled “Authorizations ”Responses
Section titled “ Responses ”Success or a refusal: read success (the refusals are in the description).
object
A machine-readable reason next to error, set only where the caller must act differently. tx_pending: the payment was not refused but could not be verified yet; keep the transaction hash and confirm again with the same hash, never pay twice.
The answer. Present when success is true.
object
false when this server has no bot: the app shows no Telegram row then and POST /api/teams/telegram/link refuses.
Whether a Telegram account is bound to your team.
false when you stopped or blocked the bot: the account stays bound, but messages cannot reach it until you start the bot again. true when you are not connected.
The account’s Telegram username, without the @. null when you are not connected or the account has none.
Why the request was refused, in plain words. Present when success is false.
true when the request did what it asked. false is a refusal: read error.
Example
{ "data": { "available": true, "connected": true, "reachable": true, "username": "fox_manager" }, "success": true}No valid session. The body is plain text: Missing Authorization header, Invalid Authorization format, Invalid session token or Session expired or invalid. Sign in again.
Example
Session expired or invalidThe connection could not be read on our side. The body is empty.