Authentication Last updated: 23.09.2024
The API uses API keys for authentication. Requests must include the API key in the request headers or as query parameters to access the endpoints. Additionally, requests must validate the originating URL and a superkey for enhanced security.
Request headers
To authenticate your requests, you need to include certain headers. These headers help verify your identity and ensure that the requests are coming from an authorized source.
- API-Key:
Your unique API key that authenticates your requests. - Superkey:
A specific key used to validate requests. This is a secondary key for added security. - Origin:
The URL of your website from which the request is made.
Code Example:
CURL Example
[
{
"method": "curl",
"headers": {
"API-Key": "YOUR_API_KEY",
"Superkey": "YOUR_SUPERKEY",
"Origin": "https://yourwebsite.com"
},
"url": "https://dat.slotsforfree.online/api.php",
"params": {
"lang": "en",
"software": [1, 2],
"rtp": 96.5,
"volatility": "High"
}
}
]
PHP Example
[
{
"language": "php",
"variables": {
"apiKey": "YOUR_API_KEY",
"superkey": "YOUR_SUPERKEY",
"origin": "https://yourwebsite.com"
},
"context": {
"http": {
"header": [
"API-Key: $apiKey",
"Superkey: $superkey",
"Origin: $origin"
]
}
},
"url": "https://dat.slotsforfree.online/api.php?lang=en&software=D1,D2&rtp=96.5&volatility=High",
"responseHandling": {
"errorCheck": "if ($response === FALSE)",
"echoResponse": "echo $response"
}
}
]
JavaScript Example
[
{
"language": "javascript",
"variables": {
"apiKey": "YOUR_API_KEY",
"superkey": "YOUR_SUPERKEY",
"origin": "https://yourwebsite.com"
},
"fetchCall": {
"method": "GET",
"url": "https://dat.slotsforfree.online/api.php?lang=en&software=D1,D2&rtp=96.5&volatility=High",
"headers": {
"API-Key": "YOUR_API_KEY",
"Superkey": "YOUR_SUPERKEY",
"Origin": "https://yourwebsite.com"
}
},
"promiseHandling": {
"then": "response => response.json()",
"log": "data => console.log(data)",
"catchError": "error => console.error('Error:', error)"
}
}
]
