预授权码(pre_auth_code)是第三方平台方实现授权托管的必备信息,每个预授权码有效期为 10 分钟。需要先获取 令牌才能调用
POST https://api.q.qq.com/api/component/preauthcode/get?component_access_token=COMPONENT_ACCESS_TOKEN
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
component_access_token | string | 是 | 令牌 |
component_appid | string | 是 | 第三方平台 appid |
POST 数据示例:
{"component_appid":"appid_value"}
参数 | 类型 | 说明 |
---|---|---|
pre_auth_code | string | 预授权码 |
expires_in | number | 有效期,单位:秒 |
返回结果示例:
{"pre_auth_code":"Cx_Dk6qiBE0Dmx4EmlT3oRfArPvwSQ-oa3NL_fwHM7VI08r52wazoZX2Rhpz1dEw","expires_in":600}
← 获取令牌 使用授权码获取授权信息 →