telegram.
Link
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.
Status
GET /v1/platform-users/telegram?external_id=<id>
Response
username and linked_at are null while nothing is linked.
Unlink
POST /v1/platform-users/telegram/unlink
Removes the linked Telegram account. Returns external_id and "linked": false.
Errors
See Errors for the full list.

