Generate Referral Code
POST/friends/v2/player/:player_uuid/referral-code
Generate and return a player's referral code if they don't already have one.
Required Permissions:
-
For any player (including themselves) :
refer:set:any -
For the player themselves :
refer:set:self
Request
Path Parameters
The player_uuid to generate a referral code for
Responses
- 200
- 403
- 422
Successful Response
- application/json
- Schema
- Example (from schema)
Schema
Possible values: >= 4 characters and <= 12 characters
{
"player_uuid": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"referral_code": "string",
"created_datetime": "2024-07-29T15:51:28.071Z",
"last_modified_timestamp": "2024-07-29T15:51:28.071Z"
}
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"
}
]
}