随机返回一段QQ签名语录
| 参数名 | 类型 | 必填 | 说明 | 示例 |
|---|---|---|---|---|
| key | string | 是 | 接口调用密钥 | |
| type | string | 否 | 返回格式,默认json可选text、json | json |
[
{
"name": "key",
"type": "string",
"required": true,
"description": "接口调用密钥",
"example": ""
},
{
"name": "type",
"type": "string",
"required": false,
"description": "返回格式,默认json可选text、json",
"example": "json"
}
]
{
"openapi": "3.1.1",
"info": {
"title": "QQ签名语录",
"description": "随机返回一段QQ签名语录",
"version": "1.0.0"
},
"paths": {
"/api/wz/QQqm/api.php": {
"get": {
"summary": "QQ签名语录",
"description": "随机返回一段QQ签名语录",
"parameters": [
{
"name": "key",
"in": "query",
"required": true,
"schema": {
"type": "string"
},
"description": "接口调用密钥"
},
{
"name": "type",
"in": "query",
"required": false,
"schema": {
"type": "string",
"example": "json"
},
"description": "返回格式,默认json可选text、json"
}
],
"responses": {
"200": {
"description": "成功",
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
}
}
}
},
"post": {
"summary": "QQ签名语录",
"description": "随机返回一段QQ签名语录",
"parameters": [
{
"name": "key",
"in": "query",
"required": true,
"schema": {
"type": "string"
},
"description": "接口调用密钥"
},
{
"name": "type",
"in": "query",
"required": false,
"schema": {
"type": "string",
"example": "json"
},
"description": "返回格式,默认json可选text、json"
}
],
"responses": {
"200": {
"description": "成功",
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
}
}
}
}
}
},
"servers": [
{
"url": "https://api-v2.317ak.com",
"description": "当前访问入口(https)"
}
]
}
{
"text": "我们和别人都还有很长的一辈子,但我们俩的一辈子好像就到这里了。"
}
随机返回一段 QQ 签名语录,适用于需要获取语录内容的应用场景。
该接口提供语录分类服务,可用于内容展示、个性签名等功能。
https://api-v2.317ak.com/api/wz/QQqm/api.php
支持 GET、POST 请求方式。
接口调用需要提供密钥。
首选鉴权方式:Query
请求时在调用地址后添加 key 参数传递密钥。
参数格式:
key=接口调用密钥
| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
| key | string | 是 | 接口调用密钥 |
| type | string | 否 | 返回格式,默认 json,可选 text、json |
{
"text": "我们和别人都还有很长的一辈子,但我们俩的一辈子好像就到这里了。"
}
| 字段名 | 类型 | 说明 |
|---|---|---|
| text | string | 返回的QQ签名语录内容 |
当接口请求失败时,将返回 JSON 格式错误信息,示例如下:
{
"code": 0,
"msg": "未提供调用密钥",
"errcode": 11001
}
| errcode | 含义 |
|---|---|
| 11001 | 未提供调用密钥 |
| 11002 | 密钥错误 |
| 11003 | 密钥已禁用 |
| 11004 | 积分余额不足 |
| 11005 | 请求过于频繁(QPM 限制) |
| 11006 | 接口维护中 |
| 11007 | 接口已禁用 |
| 11008 | 接口不可用 |
| 11009 | 密钥校验暂不可用 |
| 11010 | 积分系统暂不可用 |
| 11011 | 收费接口须提供有效密钥 |
| 11012 | 鉴权方式错误 |
| 11013 | 接口不存在 |
| 11014 | 地址无效 |
| 11015 | 地址不允许 |
| 11016 | 请求失败 |
| 11017 | 服务暂不可用 |
| 11018 | 请求方式不允许 |
| 11019 | 当前IP不在白名单内 |
| 11020 | 启用出口代理须提供有效密钥 |
| 11021 | 未配置可用出口代理 |
| 11022 | 出口代理不可用 |
| 11023 | 密钥已过期 |
| 11024 | 令牌分配积分不足 |
curl "https://api-v2.317ak.com/api/wz/QQqm/api.php?key=你的密钥&type=json"
// PHP
$url = "https://api-v2.317ak.com/api/wz/QQqm/api.php?key=你的密钥&type=json";
$response = file_get_contents($url);
echo $response;
调用接口前请妥善保管接口密钥,避免将 key 直接暴露在公开前端代码、客户端源码或可被他人访问的位置。
本接口需要通过 Query 参数 key 进行鉴权,请确保请求中携带有效密钥,否则可能无法正常获取内容。
接口调用地址请使用:
https://api-v2.317ak.com/api/wz/QQqm/api.php
请求方式支持 GET、POST,请根据业务场景选择合适的请求方式。
type 参数用于指定返回格式,未传入时默认返回 JSON 格式;如需文本格式,请传入 text。
建议使用 HTTPS 发起请求,保障请求过程中的数据传输安全。
请合理控制接口调用频率,避免短时间内大量重复请求影响接口正常使用。
接口返回内容为随机 QQ 签名语录,每次请求结果可能不同,如需固定展示内容,建议在业务侧进行缓存处理。
curl "https://api-v2.317ak.com/api/wz/QQqm/api.php?key=YOUR_API_KEY&type=json"