API 参考
每个端点都接受 JSON,并需要 X-API-Key 请求头进行身份验证。
基础 URL 和请求头
- 基础 URL
https://horizon.pm/api/v1/app- X-API-Key
- 你的项目 API Key。每个请求都要发送。
端点
25 / 25
| 方法 | 路径 | 功能 | 复制 URL |
|---|---|---|---|
| POST | /user-management/signup | 身份认证 | |
| POST | /user-management/signin | 身份认证 | |
| POST | /user-management/check-auth | 用户 | |
| POST | /user-management/change-name | 用户 | |
| GET | /player-profile | 玩家资料 | |
| PUT | /player-profile | 玩家资料 | |
| POST | /leaderboard/submit | 排行榜 | |
| GET | /leaderboards/{boardKey}/top | 排行榜 | |
| POST | /validated-actions/runs | 已验证操作 | |
| POST | /validated-actions/submit | 已验证操作 | |
| POST | /cloud-save/save | 云端存档 | |
| POST | /cloud-save/load | 云端存档 | |
| GET | /remote-config/{configKey} | 远程配置 | |
| GET | /remote-config/all | 远程配置 | |
| GET | /localization/{key} | 本地化 | |
| GET | /localization/all | 本地化 | |
| GET | /news | 新闻 | |
| POST | /gift-codes/validate | 礼品码 | |
| POST | /gift-codes/redeem | 礼品码 | |
| POST | /email-sending/send | 邮件发送 | |
| GET | /email-sending/{emailId} | 邮件发送 | |
| POST | /crash-reports/session | 崩溃报告 | |
| POST | /crash-reports/create | 崩溃报告 | |
| POST | /user-feedback/submit | 用户反馈 | |
| POST | /user-logs/create | 用户日志 |
示例请求
Bash
1curl -X POST https://horizon.pm/api/v1/app/user-management/signup \
2 -H "Content-Type: application/json" \
3 -H "X-API-Key: horizon_YOUR_API_KEY_HERE" \
4 -d '{"type":"ANONYMOUS","username":"TestPlayer","includeRefreshToken":true}'