curl --request POST \
--url https://api.example.com/api/v1/dt/game \
--header 'Content-Type: application/json' \
--data '
{
"uuid": "<string>",
"platform_id": "<string>",
"username": "<string>",
"transaction_id": "<string>",
"credit": "<string>",
"key": "<string>",
"lang": "<string>",
"homeUrl": "<string>",
"registerUrl": "<string>",
"depositUrl": "<string>",
"withdrawUrl": "<string>",
"extendSessionUrl": "<string>",
"theme_pid": "<string>",
"title": "<string>",
"favicon": "<string>",
"logoLandscape": "<string>",
"site": "<string>",
"device": "<string>"
}
'import requests
url = "https://api.example.com/api/v1/dt/game"
payload = {
"uuid": "<string>",
"platform_id": "<string>",
"username": "<string>",
"transaction_id": "<string>",
"credit": "<string>",
"key": "<string>",
"lang": "<string>",
"homeUrl": "<string>",
"registerUrl": "<string>",
"depositUrl": "<string>",
"withdrawUrl": "<string>",
"extendSessionUrl": "<string>",
"theme_pid": "<string>",
"title": "<string>",
"favicon": "<string>",
"logoLandscape": "<string>",
"site": "<string>",
"device": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
uuid: '<string>',
platform_id: '<string>',
username: '<string>',
transaction_id: '<string>',
credit: '<string>',
key: '<string>',
lang: '<string>',
homeUrl: '<string>',
registerUrl: '<string>',
depositUrl: '<string>',
withdrawUrl: '<string>',
extendSessionUrl: '<string>',
theme_pid: '<string>',
title: '<string>',
favicon: '<string>',
logoLandscape: '<string>',
site: '<string>',
device: '<string>'
})
};
fetch('https://api.example.com/api/v1/dt/game', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/v1/dt/game",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'uuid' => '<string>',
'platform_id' => '<string>',
'username' => '<string>',
'transaction_id' => '<string>',
'credit' => '<string>',
'key' => '<string>',
'lang' => '<string>',
'homeUrl' => '<string>',
'registerUrl' => '<string>',
'depositUrl' => '<string>',
'withdrawUrl' => '<string>',
'extendSessionUrl' => '<string>',
'theme_pid' => '<string>',
'title' => '<string>',
'favicon' => '<string>',
'logoLandscape' => '<string>',
'site' => '<string>',
'device' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/v1/dt/game"
payload := strings.NewReader("{\n \"uuid\": \"<string>\",\n \"platform_id\": \"<string>\",\n \"username\": \"<string>\",\n \"transaction_id\": \"<string>\",\n \"credit\": \"<string>\",\n \"key\": \"<string>\",\n \"lang\": \"<string>\",\n \"homeUrl\": \"<string>\",\n \"registerUrl\": \"<string>\",\n \"depositUrl\": \"<string>\",\n \"withdrawUrl\": \"<string>\",\n \"extendSessionUrl\": \"<string>\",\n \"theme_pid\": \"<string>\",\n \"title\": \"<string>\",\n \"favicon\": \"<string>\",\n \"logoLandscape\": \"<string>\",\n \"site\": \"<string>\",\n \"device\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/api/v1/dt/game")
.header("Content-Type", "application/json")
.body("{\n \"uuid\": \"<string>\",\n \"platform_id\": \"<string>\",\n \"username\": \"<string>\",\n \"transaction_id\": \"<string>\",\n \"credit\": \"<string>\",\n \"key\": \"<string>\",\n \"lang\": \"<string>\",\n \"homeUrl\": \"<string>\",\n \"registerUrl\": \"<string>\",\n \"depositUrl\": \"<string>\",\n \"withdrawUrl\": \"<string>\",\n \"extendSessionUrl\": \"<string>\",\n \"theme_pid\": \"<string>\",\n \"title\": \"<string>\",\n \"favicon\": \"<string>\",\n \"logoLandscape\": \"<string>\",\n \"site\": \"<string>\",\n \"device\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/dt/game")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"uuid\": \"<string>\",\n \"platform_id\": \"<string>\",\n \"username\": \"<string>\",\n \"transaction_id\": \"<string>\",\n \"credit\": \"<string>\",\n \"key\": \"<string>\",\n \"lang\": \"<string>\",\n \"homeUrl\": \"<string>\",\n \"registerUrl\": \"<string>\",\n \"depositUrl\": \"<string>\",\n \"withdrawUrl\": \"<string>\",\n \"extendSessionUrl\": \"<string>\",\n \"theme_pid\": \"<string>\",\n \"title\": \"<string>\",\n \"favicon\": \"<string>\",\n \"logoLandscape\": \"<string>\",\n \"site\": \"<string>\",\n \"device\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"url": "https://rel-game.cog888.net?pid=R01C05&token=zL13tWjRw2d0mHJSAkNtyNgjAsfTjavP6e9gQLpsOF-&homeUrl=home®isterUrl=register&depositUrl=deposit&withdrawUrl=withdraw&extendSessionUrl=extend&lang=en-us&closeAppOnLogout=1",
"urls": [
"https://rel-game.cog888.net?pid=R01C05&token=zL13tWjRw2d0mHJSAkNtyNgjAsfTjavP6e9gQLpsOF-&homeUrl=home®isterUrl=register&depositUrl=deposit&withdrawUrl=withdraw&extendSessionUrl=extend&lang=en-us&closeAppOnLogout=1",
"https://rel-game.cog888.net2?pid=R01C05&token=zL13tWjRw2d0mHJSAkNtyNgjAsfTjavP6e9gQLpsOF-&homeUrl=home®isterUrl=register&depositUrl=deposit&withdrawUrl=withdraw&extendSessionUrl=extend&lang=en-us&closeAppOnLogout=1",
"https://rel-game.cog888.net3?pid=R01C05&token=zL13tWjRw2d0mHJSAkNtyNgjAsfTjavP6e9gQLpsOF-&homeUrl=home®isterUrl=register&depositUrl=deposit&withdrawUrl=withdraw&extendSessionUrl=extend&lang=en-us&closeAppOnLogout=1"
]
}{
"error": {
"code": 2,
"msg": "request hash signature(0FACF22B9E3DB5CDC670A0F7A65BB76A) is error",
"uuid": "9e96610f-5388-42df-b3ed-ba1b3178c63b"
}
}User Login
User login and get game URL
curl --request POST \
--url https://api.example.com/api/v1/dt/game \
--header 'Content-Type: application/json' \
--data '
{
"uuid": "<string>",
"platform_id": "<string>",
"username": "<string>",
"transaction_id": "<string>",
"credit": "<string>",
"key": "<string>",
"lang": "<string>",
"homeUrl": "<string>",
"registerUrl": "<string>",
"depositUrl": "<string>",
"withdrawUrl": "<string>",
"extendSessionUrl": "<string>",
"theme_pid": "<string>",
"title": "<string>",
"favicon": "<string>",
"logoLandscape": "<string>",
"site": "<string>",
"device": "<string>"
}
'import requests
url = "https://api.example.com/api/v1/dt/game"
payload = {
"uuid": "<string>",
"platform_id": "<string>",
"username": "<string>",
"transaction_id": "<string>",
"credit": "<string>",
"key": "<string>",
"lang": "<string>",
"homeUrl": "<string>",
"registerUrl": "<string>",
"depositUrl": "<string>",
"withdrawUrl": "<string>",
"extendSessionUrl": "<string>",
"theme_pid": "<string>",
"title": "<string>",
"favicon": "<string>",
"logoLandscape": "<string>",
"site": "<string>",
"device": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
uuid: '<string>',
platform_id: '<string>',
username: '<string>',
transaction_id: '<string>',
credit: '<string>',
key: '<string>',
lang: '<string>',
homeUrl: '<string>',
registerUrl: '<string>',
depositUrl: '<string>',
withdrawUrl: '<string>',
extendSessionUrl: '<string>',
theme_pid: '<string>',
title: '<string>',
favicon: '<string>',
logoLandscape: '<string>',
site: '<string>',
device: '<string>'
})
};
fetch('https://api.example.com/api/v1/dt/game', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/v1/dt/game",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'uuid' => '<string>',
'platform_id' => '<string>',
'username' => '<string>',
'transaction_id' => '<string>',
'credit' => '<string>',
'key' => '<string>',
'lang' => '<string>',
'homeUrl' => '<string>',
'registerUrl' => '<string>',
'depositUrl' => '<string>',
'withdrawUrl' => '<string>',
'extendSessionUrl' => '<string>',
'theme_pid' => '<string>',
'title' => '<string>',
'favicon' => '<string>',
'logoLandscape' => '<string>',
'site' => '<string>',
'device' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/v1/dt/game"
payload := strings.NewReader("{\n \"uuid\": \"<string>\",\n \"platform_id\": \"<string>\",\n \"username\": \"<string>\",\n \"transaction_id\": \"<string>\",\n \"credit\": \"<string>\",\n \"key\": \"<string>\",\n \"lang\": \"<string>\",\n \"homeUrl\": \"<string>\",\n \"registerUrl\": \"<string>\",\n \"depositUrl\": \"<string>\",\n \"withdrawUrl\": \"<string>\",\n \"extendSessionUrl\": \"<string>\",\n \"theme_pid\": \"<string>\",\n \"title\": \"<string>\",\n \"favicon\": \"<string>\",\n \"logoLandscape\": \"<string>\",\n \"site\": \"<string>\",\n \"device\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/api/v1/dt/game")
.header("Content-Type", "application/json")
.body("{\n \"uuid\": \"<string>\",\n \"platform_id\": \"<string>\",\n \"username\": \"<string>\",\n \"transaction_id\": \"<string>\",\n \"credit\": \"<string>\",\n \"key\": \"<string>\",\n \"lang\": \"<string>\",\n \"homeUrl\": \"<string>\",\n \"registerUrl\": \"<string>\",\n \"depositUrl\": \"<string>\",\n \"withdrawUrl\": \"<string>\",\n \"extendSessionUrl\": \"<string>\",\n \"theme_pid\": \"<string>\",\n \"title\": \"<string>\",\n \"favicon\": \"<string>\",\n \"logoLandscape\": \"<string>\",\n \"site\": \"<string>\",\n \"device\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/dt/game")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"uuid\": \"<string>\",\n \"platform_id\": \"<string>\",\n \"username\": \"<string>\",\n \"transaction_id\": \"<string>\",\n \"credit\": \"<string>\",\n \"key\": \"<string>\",\n \"lang\": \"<string>\",\n \"homeUrl\": \"<string>\",\n \"registerUrl\": \"<string>\",\n \"depositUrl\": \"<string>\",\n \"withdrawUrl\": \"<string>\",\n \"extendSessionUrl\": \"<string>\",\n \"theme_pid\": \"<string>\",\n \"title\": \"<string>\",\n \"favicon\": \"<string>\",\n \"logoLandscape\": \"<string>\",\n \"site\": \"<string>\",\n \"device\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"url": "https://rel-game.cog888.net?pid=R01C05&token=zL13tWjRw2d0mHJSAkNtyNgjAsfTjavP6e9gQLpsOF-&homeUrl=home®isterUrl=register&depositUrl=deposit&withdrawUrl=withdraw&extendSessionUrl=extend&lang=en-us&closeAppOnLogout=1",
"urls": [
"https://rel-game.cog888.net?pid=R01C05&token=zL13tWjRw2d0mHJSAkNtyNgjAsfTjavP6e9gQLpsOF-&homeUrl=home®isterUrl=register&depositUrl=deposit&withdrawUrl=withdraw&extendSessionUrl=extend&lang=en-us&closeAppOnLogout=1",
"https://rel-game.cog888.net2?pid=R01C05&token=zL13tWjRw2d0mHJSAkNtyNgjAsfTjavP6e9gQLpsOF-&homeUrl=home®isterUrl=register&depositUrl=deposit&withdrawUrl=withdraw&extendSessionUrl=extend&lang=en-us&closeAppOnLogout=1",
"https://rel-game.cog888.net3?pid=R01C05&token=zL13tWjRw2d0mHJSAkNtyNgjAsfTjavP6e9gQLpsOF-&homeUrl=home®isterUrl=register&depositUrl=deposit&withdrawUrl=withdraw&extendSessionUrl=extend&lang=en-us&closeAppOnLogout=1"
]
}{
"error": {
"code": 2,
"msg": "request hash signature(0FACF22B9E3DB5CDC670A0F7A65BB76A) is error",
"uuid": "9e96610f-5388-42df-b3ed-ba1b3178c63b"
}
}Possible Error Codes for this API
Possible Error Codes for this API
| Code | Description |
|---|---|
| 2 | Invalid parameter |
| 10 | Duplicate transaction ID |
| 18 | Player is forbidden |
| 36 | Server error |
| 9999 | Unknown error |
Body
Platform-defined unique request ID, length >= 32 and <= 128 bytes
Platform product ID
User account in game (max 23 characters, lowercase letters and numbers only)
Transaction ID (1-128 characters, ASCII 32-126 printable characters only, ` and ~ not allowed)
Credit to bring into game for this login
md5(username + credit + transaction_id + platform secret key)
Language code (see appendix 'Language Codes'), optional
Online casino home page URL, must be encodeURIComponent encoded
Online casino registration URL, must be encodeURIComponent encoded
Online casino deposit URL, must be encodeURIComponent encoded
Online casino withdrawal URL, must be encodeURIComponent encoded
Online casino extend session URL, must be encodeURIComponent encoded
UI skin pid to display, default value if not provided
Product name shown in browser tab, defaults to COG
Product favicon shown in browser tab, defaults to COG favicon
Logo displayed in landscape lobby, defaults to COG logo
Pass 'app' string, will not show swipe-up fullscreen overlay on mobile H5 landscape
Device type, accepts PC or MB, defaults to PC if not provided; the passed value is appended to the game URL as device=PC or device=MB, and is omitted when not provided
Response
Success
URL to redirect to game platform (same as the first item of urls, kept for backward compatibility)
Array of game platform URLs for multiple routes (domain rotation / failover); the first item equals url. When the platform has only one route configured, the array contains a single item