Finish linking a Discord or Telegram account
curl --request POST \
--url https://my.server.express/api/v1/client/connections/link \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"code": "<string>",
"state": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({code: '<string>', state: '<string>'})
};
fetch('https://my.server.express/api/v1/client/connections/link', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://my.server.express/api/v1/client/connections/link"
payload = {
"code": "<string>",
"state": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"data": {
"id": "<string>",
"username": "<string>"
}
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}Account
Finish linking a Discord or Telegram account
Completes the OAuth round trip: verifies the signed state (it must name the same provider and be a link ticket), exchanges
code with the provider, and stores the provider’s user id and username on the profile. Rejects with 409 if that provider
account is already linked to another user. Writes a LINK_DISCORD / LINK_TELEGRAM audit log entry. A failed exchange with the
provider comes back as 500 carrying the underlying error message.
POST
/
v1
/
client
/
connections
/
link
Finish linking a Discord or Telegram account
curl --request POST \
--url https://my.server.express/api/v1/client/connections/link \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"code": "<string>",
"state": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({code: '<string>', state: '<string>'})
};
fetch('https://my.server.express/api/v1/client/connections/link', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://my.server.express/api/v1/client/connections/link"
payload = {
"code": "<string>",
"state": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"data": {
"id": "<string>",
"username": "<string>"
}
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}Authorizations
Session access token (JWT) from POST /v1/auth/login or /v1/auth/refresh. A session satisfies every API scope.
Body
application/json