Link
POST/users/v1/link
Link a follower platform user to a leader person.
The Leader person is found using the following priority:
- If the
leader_person_idis provided directly - If the
leader_platformandleader_platform_user_idare provided, theperson_idof that platform user is used. - If the
schemeandcredentialsare provided, the person_id of the platform user of credentials is used.
The Follower platform user is found using the following priority:
- If the
follower_platformandfollower_platform_user_idare provided directly. - If the Authorization header contains a user token, the platform and platform user id from the token are used.
For leader selection 1,2 or follower selection 1, Required Permissions:
- For any user (including themselves) any of:
user:*,user:modify:any
NOTE: Whenever you change the link or cross progression status of a user, it is recommended to refresh their access token. Each token does container user information, which may be incorrect after a link or cross progression change. There is no guarantee that calling other endpoints will operate on the correct user until the token has been refreshed.
Request
- application/json
Body
Person ID of the leader to link to. If not provided, the person will be found from the leader_platform and leader_platform_user_id
Possible values: [Anon, Basic, XboxLive, PSN, NintendoNAID, NintendoSwitch, NintendoPPID, Google, GooglePlay, Apple, Epic, Steam, Amazon, Twitch, RallyHere, LegacyName]
Platform of the leader to link to. If not provided, the leader will be found from the scheme and credentials
Possible values: <= 2048 characters
Platform user ID of the leader to link to. If not provided, the leader will be found from the scheme and credentials
Possible values: [Anon, Basic, XboxLive, PSN, NintendoNAID, NintendoSwitch, NintendoPPID, Google, GooglePlay, Apple, Epic, Steam, Amazon, Twitch, RallyHere, LegacyName]
Platform of the follower to link. If not provided, the follower will be found from the Authorization header's token
Possible values: <= 2048 characters
Platform user ID of the follower to link. If not provided, the follower will be found from the Authorization header's token
Scheme to use for the leader. For most tokens, this will be Bearer
Credentials to use for the leader. For most tokens, this will be the token itself.
Responses
- 200
- 400
- 403
- 422
Successful Response
Request inputs are not valid
Error Codes:
-
account_not_found- User Account not found -
cannot_link_same_player- Cannot link a player to themselves -
follower_already_linked- Follower is already linked to another person. They must be unlinked before they can be linked again. -
follower_has_cross_progression_enabled- follower must disable cross progression before this operation -
follower_has_restrictions- follower has restrictions that prevent this operation -
invalid_token_claims- Token has missing/invalid claims. Are you using a non-user token on a user endpoint? -
leader_has_restrictions- leader has restrictions that prevent this operation -
leader_not_found- Desired user for the leader of the link was not found -
platform_already_linked- Person is already linked to another user on this platform
- application/json
- Schema
- Example (from schema)
Schema
Default value: true
{
"auth_success": true,
"error_code": "string",
"desc": "string"
}
Error Codes:
-
auth_invalid_key_id- Invalid Authorization - Invalid Key ID in Access Token -
auth_invalid_version- Invalid Authorization - version -
auth_malformed_access- Invalid Authorization - malformed access token -
auth_not_jwt- Invalid Authorization -
auth_token_expired- Token is expired -
auth_token_format- Invalid Authorization - {} -
auth_token_invalid_claim- Token contained invalid claim value: {} -
auth_token_invalid_type- Invalid Authorization - Invalid Token Type -
auth_token_sig_invalid- Token Signature is invalid -
auth_token_unknown- Failed to parse token -
insufficient_permissions- Insufficient Permissions
- application/json
- Schema
- Example (from schema)
Schema
Default value: true
{
"auth_success": true,
"error_code": "string",
"desc": "string"
}
Validation Error
- application/json
- Schema
- Example (from schema)
Schema
Array [
Array [
- MOD1
- MOD2
]
]
detail
object[]
loc
object[]
required
anyOf
string
integer
{
"detail": [
{
"loc": [
"string",
0
],
"msg": "string",
"type": "string"
}
]
}