查詢會員 Session
查詢指定會員的所有活躍會話。
API 信息
- 端點:
POST /v2/members/sessions/check - 認證:Bearer Token
- 加密:請求使用 AES-256-GCM 加密,響應為明文 JSON
請求
請求標頭
POST /v2/members/sessions/check HTTP/1.1
Host: api.example.com
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
x-agentid: integratorNBTest04
x-timestamp: 1769746894501
x-nonce: 56ffd5ecd8a3a4457863a0bd7c298fb2
x-signature: 904e97bee2589b93e9747eed0346c68b23d8ff8b568dabaf4b94a5e89093df67
請求參數
加密前的參數
{
"username": "player001"
}
加密後的請求體
{
"cipherText": "G0ZMDELeJwx+7JcIfIFOLJjkSzANPu6krGM2uw==..."
}
| 欄位 | 類型 | 必填 | 說明 |
|---|---|---|---|
username | string | 是 | 會員帳號 |
響應
成功響應
{
"code": 0,
"message": "No error.",
"data": [
{
"mode": "real",
"gamecode": "VP_230001_1",
"sessionInfo": {
"deviceType": 1,
"ipaddress": "127.0.0.1",
"lang": "en",
"gameCode": "VP_230001_1",
"username": "VPSysDevTest001",
"launchType": 2,
"currency": "THB",
"brandCurrency": "THB",
"agentType": 1
}
}
],
"logUUID": "955585ed-adeb-436e-8be0-ebf2b81b7d15"
}
| 欄位 | 類型 | 說明 |
|---|---|---|
code | number | 響應代碼,0 表示成功 |
message | string | 響應訊息 |
data | array | 會話列表 |
data[].mode | string | 遊戲模式(real: 真錢模式,demo: 試玩模式) |
data[].gamecode | string | 遊戲代碼 |
data[].sessionInfo | object | 會話詳細信息 |
data[].sessionInfo.deviceType | number | 設備類型(1: PC, 2: Mobile) |
data[].sessionInfo.ipaddress | string | IP 地址 |
data[].sessionInfo.lang | string | 語言代碼 |
data[].sessionInfo.gameCode | string | 遊戲代碼 |
data[].sessionInfo.username | string | 會員帳號 |
data[].sessionInfo.launchType | number | 啟動類型:0 = both,1 = demo,2 = real |
data[].sessionInfo.currency | string | 會員幣別 |
data[].sessionInfo.brandCurrency | string | 品牌幣別 |
data[].sessionInfo.agentType | number | 代理商類型 |
logUUID | string | 請求追蹤 ID,用於問題排查和日誌查詢 |
錯誤響應
{
"code": 8,
"message": "The User is not exist.",
"logUUID": "6589bf8d-fe74-48bd-841a-71bf8f848f86"
}
常見錯誤碼
| 狀態碼 | 說明 |
|---|---|
| 8 | 會員不存在 |
| 11 | 參數錯誤 |
| 81 | 分支配置未找到 |
| 83 | 認證失敗 |
| 84 | 解密失敗 |
更多錯誤碼說明請參考:附錄 - 錯誤碼總覽