Registers your player lookup callback URL.
Registers the https URL BluMint calls to get your player id for a BluMint user from an account they linked. BluMint calls it only for a game whose player ids it gets from this URL, rather than naming players by an account they linked themselves: when the user registers for one of your game’s tournaments, and again before every create, once for each player in the match, so each create carries the id you answered then. BluMint never calls it for a spectator, and never for a player who has linked none of the accounts you chose in the setup form: it asks that player to link one instead. Register this URL before your game’s first tournament opens: a player can register for one of your game’s tournaments only after your lookup finds them, so until this URL is registered no one can. BluMint stops waiting after 3 seconds for a lookup made when a player registers, and after 10 seconds for each try before a create. Use and keep the ids BluMint sends and the player ids you answer only to put players into matches in your game’s BluMint tournaments and to let the spectators who chose to watch do so. Share them with no one else, and keep them secure. Registering again replaces the previous URL. The URL’s host must resolve only to public addresses, an IP-address host must be a public IPv4 address, and BluMint follows no redirects, so the URL must answer directly.
Which answer to send when BluMint calls your URL:
| Situation | Status | What happens next |
|---|---|---|
| You know the player | 200 | At registration, the player can register. Before a create, the create names the player by the id you answered. |
| You don’t know the player | 200 | At registration, the player is asked to connect their account in your game, then check again. Before a create, BluMint asks the player to connect their account and retries under the same key every 60 seconds. A player still unlinked when the tournament’s hold length runs out is disqualified. |
| You are down or overloaded | 502, 503, 504, 408, 429, or no answer | At registration, the player is told you aren’t responding and to try again in a minute. Before a create, BluMint tries the create again under the same key, as it does when your create URL is down, then the host takes the match and starts it manually. |
| BluMint’s request breaks the rules in this guide | 400 | At registration, the player can’t register. Before a create, the host takes the match and starts it manually. |
| Your server failed on this request | 500 | At registration, the player is told you aren’t responding and to try again in a minute. Before a create, the host takes the match and starts it manually. |
For what BluMint sends to your URL and how to answer it, see Player lookup.
curl --request POST \
--url https://staging.blumint.io/api/tournaments/setLookupPlayer \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"lookupPlayerUrl": "https://www.yourgame.com/api/player/lookup"
}
'const options = {
method: 'POST',
headers: {'X-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({lookupPlayerUrl: 'https://www.yourgame.com/api/player/lookup'})
};
fetch('https://staging.blumint.io/api/tournaments/setLookupPlayer', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://staging.blumint.io/api/tournaments/setLookupPlayer"
payload = { "lookupPlayerUrl": "https://www.yourgame.com/api/player/lookup" }
headers = {
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"message": "Success - Player lookup callback URL set successfully."
}Authorizations
Body
Callbacks
POST{$request.body#/lookupPlayerUrl}lookupPlayer
Body
One BluMint user per call. Each key is a linked account you chose in the setup form (discord, epic, twitch or lichess) that the user has linked on BluMint, and its array holds exactly one id, the user's id on that provider. A user holds at most one account per provider. With your secret in the body, the body also carries that field.
1 elementResponse
For a player you know, answer each key with a one-entry array holding your player id for that account, a non-empty string of at most 256 printable characters. For a miss, answer [] or [null], or leave the key out. Two keys must never name different players, and an array never holds more than one entry; either fails the call. Keys BluMint did not send are ignored. A miss is never a 404.
1256Response
The lookup callback URL is registered.
"Success - Player lookup callback URL set successfully."
curl --request POST \
--url https://staging.blumint.io/api/tournaments/setLookupPlayer \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"lookupPlayerUrl": "https://www.yourgame.com/api/player/lookup"
}
'const options = {
method: 'POST',
headers: {'X-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({lookupPlayerUrl: 'https://www.yourgame.com/api/player/lookup'})
};
fetch('https://staging.blumint.io/api/tournaments/setLookupPlayer', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://staging.blumint.io/api/tournaments/setLookupPlayer"
payload = { "lookupPlayerUrl": "https://www.yourgame.com/api/player/lookup" }
headers = {
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"message": "Success - Player lookup callback URL set successfully."
}