分享 API
通过分享链接获取JSON数据
- 方法一:在分享链接后面添加
?format=json
- 方法二:添加请求头
Accept
,值为application/json
示例:https://applo.cc/s/2/demo?format=json
网页中推荐使用专用库获取数据
基本使用步骤
- 引入脚本
方法一使用CDN
:在<head>
标签中引入脚本
html
<script src="https://cdn.jsdelivr.net/npm/applo-js/dist/applo-js.min.js"></script>
方法二从npm
中引入:
js
import Applo from 'applo-js'
- 调用脚本
js
// 根据分享链接获取账号列表
const accounts = await Applo.getAccounts('https://applo.cc/s/2/demo')
成功响应
字段 | 类型 | 描述 |
---|---|---|
code | string | 链接后缀 |
is_expired | boolean | 链接是否过期 |
accounts | Account[] | 账号列表 |
template.header_html | string | 头部html代码 |
template.footer_html | string | 底部html代码 |
template.color_primary | string | 主题色 |
注意:分享没有选择模版时template
字段为空
Account
账号
字段 | 类型 | 描述 |
---|---|---|
username | string | 账号 |
password | string | 密码 |
desc | string | 说明 |
last_check_time | string | 上次检测时间 |
status_map | object | 状态 |
country_map | object | 国家 |
成功示例
json
{
"code": "free",
"is_expired": false,
"accounts": [
{
"desc": null,
"username": "EileenPetersen@mailto.plus",
"password": "ruvHU9a1",
"last_check_time": "2025-08-07 05:00:31",
"status_map": {
"value": 200,
"label": "正常",
"color": "success"
},
"country_map": {
"label": "澳大利亚",
"value": "AUS"
}
},
{
"desc": null,
"username": "RoseColeman@mailto.plus",
"password": "4pWdmP4K",
"last_check_time": "2025-08-07 05:00:31",
"status_map": {
"value": 200,
"label": "正常",
"color": "success"
},
"country_map": {
"label": "美国",
"value": "USA"
}
}
],
"template": {
"header_html": "<h2 style=\"text-align: start;\"><span style=\"font-size: 24px;\"> </span><span style=\"font-size: 24px;\"><strong>免费AppStore共享账号</strong></span></h2>",
"footer_html": "<h2 style=\"text-align: start;\">App Store登录账号方法</h2>",
"color_primary": "#1677ff"
}
}
失败响应
字段 | 类型 | 描述 |
---|---|---|
error_type | not_found /need_password /error | 错误类型 |
error_message | string | 错误信息 |
失败示例
json
{
"error_type": "not_found",
"error_message": "链接不存在"
}