Control User
curl --request PUT \
--url https://api.example.com/api/v1/dt/user/status \
--header 'Content-Type: application/json' \
--data '
{
"uuid": "e69da788a6c841d4953c475fc42bf464",
"platform_id": "AXTES",
"username": "player001",
"type": "1",
"key": "abc123hash"
}
'import requests
url = "https://api.example.com/api/v1/dt/user/status"
payload = {
"uuid": "e69da788a6c841d4953c475fc42bf464",
"platform_id": "AXTES",
"username": "player001",
"type": "1",
"key": "abc123hash"
}
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
uuid: 'e69da788a6c841d4953c475fc42bf464',
platform_id: 'AXTES',
username: 'player001',
type: '1',
key: 'abc123hash'
})
};
fetch('https://api.example.com/api/v1/dt/user/status', 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/user/status",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'uuid' => 'e69da788a6c841d4953c475fc42bf464',
'platform_id' => 'AXTES',
'username' => 'player001',
'type' => '1',
'key' => 'abc123hash'
]),
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/user/status"
payload := strings.NewReader("{\n \"uuid\": \"e69da788a6c841d4953c475fc42bf464\",\n \"platform_id\": \"AXTES\",\n \"username\": \"player001\",\n \"type\": \"1\",\n \"key\": \"abc123hash\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.example.com/api/v1/dt/user/status")
.header("Content-Type", "application/json")
.body("{\n \"uuid\": \"e69da788a6c841d4953c475fc42bf464\",\n \"platform_id\": \"AXTES\",\n \"username\": \"player001\",\n \"type\": \"1\",\n \"key\": \"abc123hash\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/dt/user/status")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"uuid\": \"e69da788a6c841d4953c475fc42bf464\",\n \"platform_id\": \"AXTES\",\n \"username\": \"player001\",\n \"type\": \"1\",\n \"key\": \"abc123hash\"\n}"
response = http.request(request)
puts response.read_body{
"error": {
"code": 0,
"msg": "Success",
"uuid": "e69da788a6c841d4953c475fc42bf464"
}
}{
"error": {
"code": 2,
"msg": "request hash signature(0FACF22B9E3DB5CDC670A0F7A65BB76A) is error",
"uuid": "9e96610f-5388-42df-b3ed-ba1b3178c63b"
}
}Game API
Control User
Control user status (freeze/unfreeze/kick out)
PUT
/
api
/
v1
/
dt
/
user
/
status
Control User
curl --request PUT \
--url https://api.example.com/api/v1/dt/user/status \
--header 'Content-Type: application/json' \
--data '
{
"uuid": "e69da788a6c841d4953c475fc42bf464",
"platform_id": "AXTES",
"username": "player001",
"type": "1",
"key": "abc123hash"
}
'import requests
url = "https://api.example.com/api/v1/dt/user/status"
payload = {
"uuid": "e69da788a6c841d4953c475fc42bf464",
"platform_id": "AXTES",
"username": "player001",
"type": "1",
"key": "abc123hash"
}
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
uuid: 'e69da788a6c841d4953c475fc42bf464',
platform_id: 'AXTES',
username: 'player001',
type: '1',
key: 'abc123hash'
})
};
fetch('https://api.example.com/api/v1/dt/user/status', 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/user/status",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'uuid' => 'e69da788a6c841d4953c475fc42bf464',
'platform_id' => 'AXTES',
'username' => 'player001',
'type' => '1',
'key' => 'abc123hash'
]),
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/user/status"
payload := strings.NewReader("{\n \"uuid\": \"e69da788a6c841d4953c475fc42bf464\",\n \"platform_id\": \"AXTES\",\n \"username\": \"player001\",\n \"type\": \"1\",\n \"key\": \"abc123hash\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.example.com/api/v1/dt/user/status")
.header("Content-Type", "application/json")
.body("{\n \"uuid\": \"e69da788a6c841d4953c475fc42bf464\",\n \"platform_id\": \"AXTES\",\n \"username\": \"player001\",\n \"type\": \"1\",\n \"key\": \"abc123hash\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/dt/user/status")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"uuid\": \"e69da788a6c841d4953c475fc42bf464\",\n \"platform_id\": \"AXTES\",\n \"username\": \"player001\",\n \"type\": \"1\",\n \"key\": \"abc123hash\"\n}"
response = http.request(request)
puts response.read_body{
"error": {
"code": 0,
"msg": "Success",
"uuid": "e69da788a6c841d4953c475fc42bf464"
}
}{
"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 |
|---|---|
| 0 | Success |
| 2 | Invalid parameter |
| 19 | Request limit reached |
| 20 | Secret key error |
| 21 | Invalid username |
| 25 | Type parameter error |
| 36 | Server error |
| 9999 | Unknown error |
Body
application/json
Platform-defined unique request serial number
Platform product ID
User account in game
Control type: 0 - Enable, 1 - Disable (force disconnect online users), 2 - Suspend (online users will not be forced to disconnect)
md5(type + username + platform_secret)
Response
Success
Show child attributes
Show child attributes
⌘I