Skip to content

Disconnect Telegram

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

Forgets the Telegram account bound to your team, with any link still open. Answers your status after it. Nothing bound is not a refusal.

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
available
required

false when this server has no bot: the app shows no Telegram row then and POST /api/teams/telegram/link refuses.

boolean
connected
required

Whether a Telegram account is bound to your team.

boolean
reachable
required

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.

boolean
username
required

The account’s Telegram username, without the @. null when you are not connected or the account has none.

string | null
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": {
"available": true,
"connected": false,
"reachable": true,
"username": null
},
"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 connection could not be removed on our side. The body is empty.