API SpecificationPRIVATEAccounts
Add Connection
Links a new identity provider (GitHub, Discord, or password) to the authenticated user's account. Only one connection per provider type is allowed.
Required scopes: auth:account:edit
Authorization
BearerAuth AuthorizationBearer <token>
JWT access token for internal API access. Requires 'private' scope for most endpoints, 'admin' scope for administrative operations.
In: header
Header Parameters
Connect-Protocol-Version*number
Define the version of the Connect protocol
Value in
1Connect-Timeout-Ms?number
Define the timeout, in ms
Request Body
application/json
idpSlug?string
Identity provider slug to add
Length
1 <= length <= 64code?string
OAuth authorization code (or exchange code for password)
Length
1 <= length <= 512state?string|null
OAuth state parameter (required by providers that use state)
[key: string]?never
Response Body
application/json
application/json
curl -X POST "https://auth.xeonr.io/xeonr.auth.private.v1.AccountService/AddConnection" \ -H "Connect-Protocol-Version: 1" \ -H "Content-Type: application/json" \ -d '{}'{
"connection": {
"idpSlug": "string",
"username": "johndoe_github",
"createdAt": "2023-01-15T01:30:15.01Z",
"externalId": "12345678",
"identityProviderId": "string",
"email": "[email protected]"
}
}{
"code": "not_found",
"message": "string",
"details": [
{
"type": "string",
"value": "string",
"debug": {}
}
]
}