查詢在線會員
查詢當前在線的會員列表。
API 信息
- 端點:
POST /v2/members/online - 認證:Bearer Token
- 加密:請求使用 AES-256-GCM 加密,響應為明文 JSON
請求
請求標頭
POST /v2/members/online 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
請求參數
加密前的參數
{}
加密後的請求體
{
"cipherText": "G0ZMDELeJwx+7JcIfIFOLJjkSzANPu6krGM2uw==..."
}
響應
成功響應
{
"code": 0,
"message": "No error.",
"data": {
"userList": ["testacoount001", "testacoount002"],
"counts": 2
},
"logUUID": "b77d7a71-94f7-4503-8e33-3309a7fc1e19"
}
響應欄位說明
| 欄位 | 類型 | 說明 |
|---|---|---|
data.userList | array | 在線會員名稱列表 |
data.counts | number | 總在線會員數 |
錯誤響應
{
"code": 7,
"message": "Internal server error",
"logUUID": "24cdc3b9-9fe8-44de-8391-a96863e46954"
}
常見錯誤碼
| 狀態碼 | 說明 |
|---|---|
| 7 | 意外錯誤 |
注意事項
- 數據更新頻率:在線會員數據每 30 秒更新一次