返回一张头像框图片
| 参数名 | 类型 | 必填 | 说明 | 示例 |
|---|---|---|---|---|
| key | string | 是 | 接口调用密钥 | |
| string | 是 | 需要生成的 QQ 号 | 1945735 |
[
{
"name": "key",
"type": "string",
"required": true,
"description": "接口调用密钥",
"example": ""
},
{
"name": "qq",
"type": "string",
"required": true,
"description": "需要生成的 QQ 号",
"example": "1945735"
}
]
{
"openapi": "3.1.1",
"info": {
"title": "随机头像框",
"description": "返回一张头像框图片",
"version": "1.0.0"
},
"paths": {
"/api/bqbjk/sjtxk/api.php": {
"get": {
"summary": "随机头像框",
"description": "返回一张头像框图片",
"parameters": [
{
"name": "key",
"in": "query",
"required": true,
"schema": {
"type": "string"
},
"description": "接口调用密钥"
},
{
"name": "qq",
"in": "query",
"required": true,
"schema": {
"type": "string",
"example": "1945735"
},
"description": "需要生成的 QQ 号"
}
],
"responses": {
"200": {
"description": "成功",
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
}
}
}
},
"post": {
"summary": "随机头像框",
"description": "返回一张头像框图片",
"parameters": [
{
"name": "key",
"in": "query",
"required": true,
"schema": {
"type": "string"
},
"description": "接口调用密钥"
},
{
"name": "qq",
"in": "query",
"required": true,
"schema": {
"type": "string",
"example": "1945735"
},
"description": "需要生成的 QQ 号"
}
],
"responses": {
"200": {
"description": "成功",
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
}
}
}
}
}
},
"servers": [
{
"url": "https://api-v2.317ak.com",
"description": "当前访问入口(https)"
}
]
}
返回一张头像框图片,用于为指定 QQ 号生成对应的头像框效果。
适用于需要获取头像装饰图片的应用或服务。
https://api-v2.317ak.com/api/bqbjk/sjtxk/api.php
GET、POST
本接口需要提供调用密钥。
首选鉴权方式:Query 参数鉴权。
请求时通过 Query 参数传递:
key=接口调用密钥
| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
| key | string | 是 | 接口调用密钥,通过 Query 参数 key 传递。 |
| string | 是 | 需要生成头像框的 QQ 号。 |
{
"code": 200,
"msg": "success",
"data": "头像框图片地址"
}
| 字段 | 类型 | 说明 |
|---|---|---|
| code | int | 请求状态标识 |
| msg | string | 响应提示信息 |
| data | string | 返回的头像框图片内容或图片地址 |
{
"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 -G "https://api-v2.317ak.com/api/bqbjk/sjtxk/api.php" \
--data-urlencode "key=你的接口密钥" \
--data-urlencode "qq=1945735"
// PHP
## 注意事项
- 调用接口前需准备有效密钥,并通过 Query 参数 `key` 进行鉴权。密钥应妥善保存,避免公开发布、提交到公开代码仓库或暴露在前端页面中。
- 接口调用地址需使用 HTTPS 方式访问,避免在传输过程中泄露请求参数中的敏感信息。
- `qq` 参数为必填项,请传入有效的 QQ 号字符串。参数格式异常或缺少必要参数可能导致请求失败。
- 请合理控制接口调用频率,避免短时间内大量重复请求,以保证接口稳定使用。
- 本接口返回头像框图片内容,请根据实际业务场景处理返回结果,不要将无效响应直接作为图片资源使用。
- 免费接口仍需遵守正常调用规范,禁止恶意请求、批量滥用或影响其他用户正常使用。# 随机头像框接口调用
curl -X GET \
"https://api-v2.317ak.com/api/bqbjk/sjtxk/api.php?key=YOUR_API_KEY&qq=1945735"
# 替换为你的 QQ 号
# key 使用接口密钥