Skip to content

Link

POST
/users/v1/link

Link a follower platform user to a leader person.

The Leader person is found using the following priority:

  1. If the leader_person_id is provided directly
  2. If the leader_platform and leader_platform_user_id are provided, the person_id of that platform user is used.
  3. If the scheme and credentials are provided, the person_id of the platform user of credentials is used.

The Follower platform user is found using the following priority:

  1. If the follower_platform and follower_platform_user_id are provided directly.
  2. 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.

Authorizations

Request Body

object
leader_person_id

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

string format: uuid
leader_platform

Platform of the leader to link to. If not provided, the leader will be found from the scheme and credentials

string
Allowed values: Anon Basic XboxLive PSN NintendoNAID NintendoSwitch NintendoPPID Google GooglePlay Apple Epic Steam Amazon Twitch RallyHere LegacyName
leader_platform_user_id

Platform user ID of the leader to link to. If not provided, the leader will be found from the scheme and credentials

string
<= 2048 characters
follower_platform

Platform of the follower to link. If not provided, the follower will be found from the Authorization header’s token

string
Allowed values: Anon Basic XboxLive PSN NintendoNAID NintendoSwitch NintendoPPID Google GooglePlay Apple Epic Steam Amazon Twitch RallyHere LegacyName
follower_platform_user_id

Platform user ID of the follower to link. If not provided, the follower will be found from the Authorization header’s token

string
<= 2048 characters
scheme

Scheme to use for the leader. For most tokens, this will be Bearer

string
credentials

Credentials to use for the leader. For most tokens, this will be the token itself.

string

Responses

200

Successful Response

400

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
object
auth_success
boolean
default: true
error_code
required
string
desc
required
string

403

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_sig_invalid - Token Signature is invalid
  • auth_token_unknown - Failed to parse token
  • insufficient_permissions - Insufficient Permissions
object
auth_success
boolean
default: true
error_code
required
string
desc
required
string

422

Validation Error

object
detail
Array<object>
object
loc
required
Array
msg
required
string
type
required
string