Coinflip
Flip a coin.
Request Information
GET https://exorion.xyz/api/coinflip
Code Examples
import requests
url = "https://exorion.xyz/api/coin-flip"
headers = {
"Authorization": "API_KEY" # Your Server API key from /settings
}
params = {
"probability": 50 # (0-100). Defaults to 50 if omitted.
}
response = requests.get(url, headers=headers, params=params, timeout=10)
print(response.status_code)
print(response.json())const fetch = require("node-fetch");
const url = new URL("https://exorion.xyz/api/coin-flip");
// defaults to 50%
url.searchParams.append("probability", "70"); // 70% Heads, 30% Tails
const headers = {
"Authorization": "API_KEY", // API key found in /settings
"Content-Type": "application/json"
};
fetch(url, { headers })
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error("Error:", err));Last updated