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_id
is provided directly - If the
leader_platform
andleader_platform_user_id
are provided, theperson_id
of that platform user is used. - If the
scheme
andcredentials
are 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_platform
andfollower_platform_user_id
are 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.
Authorizations
Request Body
object
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
Platform of the leader to link to. If not provided, the leader will be found from the scheme
and credentials
Platform user ID of the leader to link to. If not provided, the leader will be found from the scheme
and credentials
Platform of the follower to link. If not provided, the follower will be found from the Authorization header’s token
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
Successful Response
400
Request inputs are not valid
Error Codes:
account_not_found
- User Account not foundcannot_link_same_player
- Cannot link a player to themselvesfollower_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 operationfollower_has_restrictions
- follower has restrictions that prevent this operationinvalid_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 operationleader_not_found
- Desired user for the leader of the link was not foundplatform_already_linked
- Person is already linked to another user on this platform
object
403
Error Codes:
auth_invalid_key_id
- Invalid Authorization - Invalid Key ID in Access Tokenauth_invalid_version
- Invalid Authorization - versionauth_malformed_access
- Invalid Authorization - malformed access tokenauth_not_jwt
- Invalid Authorizationauth_token_expired
- Token is expiredauth_token_format
- Invalid Authorization - {}auth_token_invalid_claim
- Token contained invalid claim value: {}auth_token_sig_invalid
- Token Signature is invalidauth_token_unknown
- Failed to parse tokeninsufficient_permissions
- Insufficient Permissions
object
422
Validation Error