get_credentials

get_credentials只读扩展
获取凭证

通过 POST http://127.0.0.1:3000/get_credentials(请求体为 JSON 参数)或 WebSocket 调用。

输入参数

参数 类型 必填 默认 说明
domain string "qun.qq.com"

返回 (data)

{ cookies, token, csrf_token }:Cookie 字符串与 CSRF 令牌(token 与 csrf_token 同值)。

所有响应都包裹在标准信封中:{ "status": "ok", "retcode": 0, "data": ... }。下表描述 data 字段。

字段 类型 必填 说明
cookies string 该域名的 Cookie 字符串
token integer CSRF 令牌(bkn)
csrf_token integer CSRF 令牌(同 token)
原始 JSON Schema
{
  "type": "object",
  "properties": {
    "cookies": {
      "type": "string",
      "description": "该域名的 Cookie 字符串"
    },
    "token": {
      "type": "integer",
      "description": "CSRF 令牌(bkn)"
    },
    "csrf_token": {
      "type": "integer",
      "description": "CSRF 令牌(同 token)"
    }
  },
  "required": [
    "cookies",
    "token",
    "csrf_token"
  ]
}

调用示例

curl
Python
JavaScript
Go
SnowLuma SDK
curl -X POST http://127.0.0.1:3000/get_credentials \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer <access-token>' \
  -d '{"domain":"qun.qq.com"}'
在用 AI 助手?

支持 MCP 的客户端可直接发现并调用本动作,无需手写 HTTP。见 MCP 接入