Skip to content

Make a Connect Telegram link

POST
/api/teams/telegram/link
curl --request POST \
--url https://foxleague.ai/api/teams/telegram/link \
--header 'Authorization: Bearer <token>'

Answers a one-use link to the bot’s private chat, good for 15 minutes. Pressing Start there binds that Telegram account to your team. A new link ends your earlier one. One Telegram account binds to one team and a team to one Telegram account: the bot refuses while either is bound elsewhere. Refusals: Team not found; telegram_not_available with Telegram is not available on this server.; telegram_unreachable with Telegram cannot be reached right now. Try again in a minute.

Success or a refusal: read success (the refusals are in the description).

Media type application/json
object
code

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.

string | null
data

The answer. Present when success is true.

object
expires_in_seconds
required

Seconds the link works for: 900.

integer format: int64
url
required

The https://t.me/... link that opens the bot’s private chat. Open it and press Start. It works once.

string
error

Why the request was refused, in plain words. Present when success is false.

string | null
success
required

true when the request did what it asked. false is a refusal: read error.

boolean
Example
{
"data": {
"expires_in_seconds": 900,
"url": "https://t.me/FoxleagueBot?start=q2Xc0PpV8Zr7uYk1Nf3Lw6Bm9Td5Hs4Ga_Ej-RtUoIi"
},
"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.

Media type text/plain
string
Example
Session expired or invalid

The link could not be made on our side. The body is empty.