QQ凭证获取核心数据 POST
通过已绑定的 QQ 凭证(openid + access_token)获取用户账号的核心数据,无需再传用户名密码。请求方法: POST Content-Type: application/x-www-form-urlencoded
SDK 调用示例
PythonNode.jsJavaC#PHPpython
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登录 获得凭证。
请求参数
openid | string | 必填 | QQ openid(32 位字母数字) |
access_token | string | 必填 | QQ access_token(32 位字母数字) |
成功响应
JSON 格式文本格式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 未匹配到已绑定的账号 |
请先充值后使用 | 账号 use_time=0(未激活) |
通用错误