Skip to main content
A platform user can link their Telegram account through the CabalSpy ID Telegram bot. The linked account shows in the user object as telegram. POST /v1/platform-users/telegram/link Returns a deep_link to the bot with a one-time code. Show it to the user as a button or QR code. When they open it and start the bot, the account is linked. Check with the status endpoint below. If the Telegram account already belongs to a CabalSpy ID, the person just proved it is theirs: your user moves to that ID (platform_user.merged, new csid_id, same external_id). If that ID is already your user under another external_id, the bot says so and nothing changes. Signing in to CabalSpy ID with this Telegram later opens the same account, which the person then manages themselves.
string
required
Your id of the user. Alternatively pass csid_id.
string
Your id of the user.
string
The one-time code inside the deep link.
https://t.me/...?start=<code>, the link to open.
string
When the code expires.

Status

GET /v1/platform-users/telegram?external_id=<id>
Response
username and linked_at are null while nothing is linked. POST /v1/platform-users/telegram/unlink Removes the linked Telegram account. Returns external_id and "linked": false.
string
required
Your id of the user. Alternatively pass csid_id.

Errors

See Errors for the full list.