Begin linking a Telegram or Discord chat to a login: the same one-time code the member area hands out. Show the code (and, for Telegram, the link or its QR); the customer sends it to the bot. It works once and lives 15 minutes; starting again retires the earlier code. Refresh the account (get_customer) afterwards — chats..linked turns true once the bot has taken it. Refused when the store does not offer that chat or it is already linked.
Request Parameters
Field
Type
Required
Description
customer_id
integer
Requiredone of these two
The customer
customer_email
string
Requiredone of these two
Their address
platform
string
Required
telegram or discord
Response Fields
Field
Type
Description
code
string
The 8-character code
expires_in
integer
Seconds the code lives (900)
telegram_url
string
A tap-to-link https://t.me/… link (Telegram only; empty until the bot has a username)
telegram_scheme
string
The same link in tg:// form, for a QR code
discord_invite_url
string
The server invite, when one is set (Discord only). In the server the customer types /link and pastes the code