API 文档
LinkCRM API 使用文档,通过 API 可以提交外链到系统
加载中...
LinkCRM API 使用文档,通过 API 可以提交外链到系统
使用 API Key 进行身份验证,支持浏览器插件、自动化脚本等场景
POST /api/v1/links/submit在请求头中添加 API Key,支持以下三种方式:
x-api-key: YOUR_API_KEYAuthorization: Bearer YOUR_API_KEY?api_key=YOUR_API_KEY (Query参数)curl -X POST https://linktrx.jiahaoyg.xyz/api/v1/links/submit \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com",
"title": "示例网站",
"description": "这是一个示例网站的描述",
"category": "技术平台",
"publishType": "写文章",
"example": ["https://example.com/article1"],
"cost": 0.5,
"contact_info": "contact@example.com",
"page_authority": 50
}'fetch('https://linktrx.jiahaoyg.xyz/api/v1/links/submit', {
method: 'POST',
headers: {
'x-api-key': 'YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
url: 'https://example.com',
title: '示例网站',
description: '这是一个示例网站的描述',
category: '技术平台',
publishType: '写文章',
example: ['https://example.com/article1'],
cost: 0.5,
contact_info: 'contact@example.com',
page_authority: 50
})
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));import requests
url = 'https://linktrx.jiahaoyg.xyz/api/v1/links/submit'
headers = {
'x-api-key': 'YOUR_API_KEY',
'Content-Type': 'application/json'
}
data = {
'url': 'https://example.com',
'title': '示例网站',
'description': '这是一个示例网站的描述',
'category': '技术平台',
'publishType': '写文章',
'example': ['https://example.com/article1'],
'cost': 0.5,
'contact_info': 'contact@example.com',
'page_authority': 50
}
response = requests.post(url, headers=headers, json=data)
print(response.json()){
"success": true,
"data": {
"id": 123,
"url": "https://example.com",
"title": "示例网站",
"status": "待审核",
"message": "外链提交成功,等待审核"
}
}{
"success": false,
"error": "错误信息描述"
}200 - 请求成功400 - 请求参数错误401 - API Key 无效或未提供500 - 服务器内部错误1. 审核流程:提交的外链需要管理员审核通过后才能生效。审核通过后您将获得1个信用点奖励。
2. 重复检查:系统会检查URL是否已存在,如果已存在会返回错误。
3. 内容验证:标题和描述中不能包含域名,系统会自动验证。
4. API Key 安全:请妥善保管您的 API Key,不要泄露给他人。如果怀疑 API Key 泄露,请及时重新生成。
5. 频率限制:为避免滥用,系统可能会对API调用频率进行限制。