QQ资料卡强制跳转API文档
⚠️ 重要声明: 本API可以无视隐私设置查看对方QQ资料卡,请严格遵守使用规范,勿用于非法用途。请求频率限制为每分钟最多30次。
如果遇到接口问题,可以在下方评论区留言或者发送邮件至:3839913185@qq.com
📋 接口基本信息
🔧 请求参数
参数名 | 类型 | 是否必需 | 说明 | 示例 |
---|---|---|---|---|
String | ✅ 是 | 需要强制跳转的QQ号码 | 3816847927 |
🌐 请求示例
https://sgyyds.hebil.xyz/api/qqqztz.php?qq=3816847927
📨 返回结果
✅ 成功响应
直接进行302重定向到QQ资料卡页面。
HTTP状态码: 302 Found
Location头: 对应的QQ资料卡URL
❌ 错误响应
1. 参数错误 (400 Bad Request)
{
"success": false,
"error": {
"code": "INVALID_QQ",
"message": "QQ号码格式不正确",
"details": "QQ号必须是5-11位数字且不以0开头"
},
"timestamp": "2024-01-15T10:30:00Z"
}
2. 请求频率限制 (429 Too Many Requests)
{
"success": false,
"error": {
"code": "RATE_LIMIT_EXCEEDED",
"message": "请求过于频繁,请稍后再试",
"limit": 30,
"period": 60,
"retry_after": 45
},
"timestamp": "2024-01-15T10:30:00Z"
}
💡 使用建议
- 📱 移动端适配:该API在移动端和桌面端均可正常使用
- ⏱️ 频率控制:建议在代码中添加请求间隔控制,避免触发频率限制
- 🔒 错误处理:请妥善处理错误响应,提供友好的用户提示
- 📊 日志记录:建议记录API调用日志,便于排查问题
🚨 常见问题
❓ 为什么需要这样的API?
在某些合法场景下,如客服系统、用户身份验证等,需要快速跳转到用户QQ资料卡。
❓ 频率限制是如何计算的?
频率限制基于IP地址计算,每分钟最多30次请求,超过限制会返回429错误。
❓ 支持国际版QQ吗?
目前仅支持中国大陆地区的QQ号码。
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
line-height: 1.6;
color: #333;
max-width: 800px;
margin: 0 auto;
padding: 20px;
background-color: #f8f9fa;
}
h1, h2, h3, h4 {
color: #2c3e50;
margin-top: 1.5em;
margin-bottom: 0.5em;
}
h2 {
border-left: 4px solid #3498db;
padding-left: 15px;
margin-top: 2em;
}
h3 {
color: #34495e;
margin-top: 1.5em;
}
h4 {
color: #16a085;
margin: 1em 0 0.5em;
}
.post-meta {
color: #666;
font-style: italic;
margin-bottom: 30px;
}
.warning {
background-color: #fff3e0;
border-left: 4px solid #ff9800;
padding: 15px;
margin: 20px 0;
border-radius: 4px;
}
.support {
background-color: #e7f4ff;
border-left: 4px solid #3498db;
padding: 15px;
margin: 20px 0;
border-radius: 4px;
}
.api-info {
background-color: #f8f9fa;
padding: 15px;
border-radius: 5px;
margin: 20px 0;
}
.info-item {
display: flex;
margin-bottom: 10px;
align-items: center;
}
.info-item:last-child {
margin-bottom: 0;
}
.label {
font-weight: bold;
min-width: 80px;
color: #2c3e50;
}
.value {
color: #3498db;
font-family: 'Courier New', monospace;
}
.params-table {
width: 100%;
border-collapse: collapse;
margin: 20px 0;
background: white;
border-radius: 5px;
overflow: hidden;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.params-table th, .params-table td {
border: 1px solid #ddd;
padding: 12px;
text-align: left;
}
.params-table th {
background-color: #f2f2f2;
font-weight: bold;
}
.code-block {
background-color: #2d2d2d;
color: #f8f8f2;
padding: 15px;
border-radius: 5px;
margin: 15px 0;
overflow-x: auto;
font-family: 'Fira Code', 'Courier New', monospace;
}
.response {
padding: 15px;
border-radius: 5px;
margin: 15px 0;
}
.response.success {
background-color: #e8f5e9;
border-left: 4px solid #4caf50;
}
.response.error {
background-color: #ffebee;
border-left: 4px solid #f44336;
}
.response-detail {
margin-top: 10px;
padding-left: 15px;
border-left: 2px solid #bdbdbd;
}
.faq {
margin: 30px 0;
}
.faq-item {
background: white;
padding: 20px;
margin-bottom: 15px;
border-radius: 5px;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
ul {
margin-left: 20px;
margin-bottom: 20px;
}
li {
margin-bottom: 8px;
}
a {
color: #3498db;
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
@media (max-width: 768px) {
body {
padding: 15px;
}
h2 {
font-size: 1.3em;
}
.params-table {
font-size: 0.9em;
}
.params-table th, .params-table td {
padding: 8px;
}
.code-block {
padding: 10px;
font-size: 0.9em;
}
}
本文系作者 @sgyyds 原创发布在孙哥博客站点。未经许可,禁止转载。
暂无评论数据