Skip to content

QQ凭证获取核心数据 POST

通过已绑定的 QQ 凭证(openid + access_token)获取用户账号的核心数据,无需再传用户名密码。

请求方法: POST  Content-Type: application/x-www-form-urlencoded

💡 SDK 快速接入

官方 SDK 已支持此接口,您可以直接使用 SDK 一键调用,无需手动处理加密和签名。

对接示例也已支持此接口

SDK 调用示例

python
result = verify.get_user_core_by_qq('openid', 'access_token')
if result['success']:
    print(f"核心数据: {result['core']}")
javascript
const result = await verify.getUserCoreByQq('openid', 'access_token');
if (result.success) console.log(`核心数据: ${result.core}`);
java
T3Verify.T3Result result = verify.getUserCoreByQq("openid", "access_token");
if (result.success) System.out.println("核心数据: " + result.msg);
csharp
var result = verify.GetUserCoreByQq("openid", "access_token");
if (result.Success) Console.WriteLine($"核心数据: {result.Msg}");
php
$result = $verify->getUserCoreByQq('openid', 'access_token');
if ($result['success']) echo "核心数据: {$result['core']}\n";

前提条件

用户需先通过 绑定QQ 接口完成绑定,或已通过 用户QQ登录 获得凭证。

请求参数

参数类型必填说明
openidstring必填QQ openid(32 位字母数字)
access_tokenstring必填QQ access_token(32 位字母数字)
tnumber条件必填秒级 Unix 时间戳
sstring条件必填请求签名
safe_codestring可选数据验证码

成功响应

jsonc
{
  "code": "200",
  "msg": "48656c6c6f"   // 核心数据 (bin2hex 编码)
}
txt
48656c6c6f

Hex 编码

返回值为 bin2hex(core),SDK 侧需要 hex-decode 后使用。

错误列表

业务错误

错误消息原因
openid不可为空 / access_token不可为空凭证未传
openid只能为英文或数字 / access_token只能为英文或数字凭证含非法字符
openid格式错误 / access_token格式错误凭证长度不是 32 位
该QQ未绑定用户openid + access_token 未匹配到已绑定的账号
用户已禁用用户 active=0
请先充值后使用账号 use_time=0(未激活)
用户使用时间已到期账号已过期且 mode=0

通用错误

错误消息原因
程序未开启 / 接口未开启程序或接口未启用
时间戳参数不可为空开启时间戳验证但未传 t
验证数据已失效,请重试时间戳校验失败(排障指南
签名参数不可为空开启签名验证但未传 s
签名有误签名校验失败

T3 网络验证 WebAPI 开发文档