Game List
Get list of games
Request Example
POST /serviceApi.php HTTP/1.1
Content-Type: application/json
https://stg.otkgaming.com/serviceApi.php
{
"action" : "gameList",
"platform" : 8,
"partnerId" : 1,
"currency" : "USD",
"time" : "24-03-2021 11:03:04",
"hash" : "36435dd6e55d8926e2b97c4ae7450bee"
}
Hash calculation example
- Node.js (JavaScript)
- Go
- Python
- PHP
https://stg.otkgaming.com
const crypto = require('crypto');
const privateKey = "providedPrivateKey";
const time = "24-03-2021 11:03:04";
const hash = crypto.createHash('sha256')
.update(privateKey + time)
.digest('hex');
console.log(hash);
https://stg.otkgaming.com
package main
import (
"crypto/sha256"
"fmt"
)
func main() {
privateKey := "providedPrivateKey"
time := "24-03-2021 11:03:04"
data := privateKey + time
hash := sha256.Sum256([]byte(data))
hashString := fmt.Sprintf("%x", hash)
fmt.Println(hashString)
}
https://stg.otkgaming.com
import hashlib
private_key = "providedPrivateKey"
time = "24-03-2021 11:03:04"
data = private_key + time
hash_object = hashlib.sha256(data.encode())
hash = hash_object.hexdigest()
print(hash)
https://stg.otkgaming.com
<?php
$privateKey = "providedPrivateKey";
$time = "24-03-2021 11:03:04";
$hash = hash("sha256", $privateKey . $time);
echo $hash;
?>
Result
d8ac5ca5c416c1aeadca11013e6dbaa613248739d7c1ad19e6f7601d57d4699f
Options
| Property Name | Descriptio | Type | Notes |
|---|---|---|---|
| action | request type | string | |
| platform | platform identifier | integer | unique per platform |
| currency | bets are shown in passed parameter | string | example USD,EUR,BYN |
| partnerId | identifier of partner on the platform | integer | |
| time | request time | string | dd-mm-yyyy hh:mm:ss |
| hash | calculated sha256 string (privateKey provided game provider’s side) | string | hash string is calculated based on privateKey, time, and "data" in JSON string. Example $hash = hash("sha256", "privateKey15-02-2023 15:31:31json_encode(data)"); |
Response Example
- Success
- Rejected
https://stg.otkgaming.com/serviceApi.php
{
"code" : 0,
"message" : "ok",
"data": {
"slots": [
{
"id" : 1,
"gameName" : "Blazing Hot",
"bets" : [0.02,0.04,0.06],
"thumbnail" : "https://otkgaming.com/gameThumbnails/1.jpg",
"status" : 1
},
{
"id" : 2,
"gameName" : "Diamond Flash",
"bets" : [0.02,0.04,0.06],
"thumbnail" : "https://otkgaming.com/gameThumbnails/2.jpg",
"status" : 1
}
]
}
}
https://stg.otkgaming.com/serviceApi.php
{
"code" : 8,
"message" : "hash not valid",
"data" : null
}
{
"code" : 9,
"message" : "platform not valid (partnerid or platform values are wrong",
"data" : null
}