Tài khoản
Kiểm tra một key: tài khoản khách hàng sở hữu key, các scope, gói và rate limit của key.
Kiểm tra một key: tài khoản khách hàng sở hữu key, các scope, gói và rate limit của key.
Base URL https://api.hillsmusic.com/v1. Mọi request đều gửi một API key: Authorization: Bearer hm_live_….
- Tôi là ai
- Kiểm tra kết nối
Tôi là ai
GET /v1/me · Mọi key hợp lệ
Tài khoản khách hàng sở hữu key, cùng tên, các scope và thời hạn của key. Tiện để kiểm tra key có hoạt động không.
Ví dụ request
curl "https://api.hillsmusic.com/v1/me" \
-H "Authorization: Bearer $HILLS_API_KEY"
Phản hồi 200
{
"partner": {
"id": 12,
"name": "Nova Records",
"email": "ops@novarecords.com"
},
"environment": "production",
"key": {
"id": 3,
"name": "ERP sync",
"prefix": "hm_live_ab12cd34",
"environment": "production",
"scopes": [
"catalog:read",
"earnings:read"
],
"expires_at": null,
"created_at": "2026-10-01T09:00:00Z"
}
}
Lỗi
| Mã trạng thái | Khi nào |
|---|---|
| 401 | unauthenticated, invalid_key, key_revoked, key_expired hoặc test_keys_retired. |
| 403 | account_inactive hoặc api_not_in_plan. |
| 429 | rate_limited: chờ số giây ghi trong Retry-After. |
Kiểm tra kết nối
GET /v1/ping · Mọi key hợp lệ
Mọi key hợp lệ: tài khoản, gói, các scope của key, hạn mức rate limit còn lại và giờ của server. Lệnh gọi hiển thị trên trang phân phối DDEX (Connection, Activity).
Ví dụ request
curl "https://api.hillsmusic.com/v1/ping" \
-H "Authorization: Bearer $HILLS_API_KEY"
Phản hồi 200
{
"ok": true,
"environment": "production",
"server_time": "2026-10-07T09:00:00.000Z",
"account": {
"id": 12,
"name": "Nova Records",
"email": "ops@novarecords.com"
},
"plan": {
"included": true,
"plan": "enterprise",
"rate": 120
},
"key": {
"prefix": "hm_live_ab12cd34",
"scopes": [
"ddex:write"
]
},
"rate_limit": {
"limit": 120,
"remaining": 119
}
}
Lỗi
| Mã trạng thái | Khi nào |
|---|---|
| 401 | unauthenticated, invalid_key, key_revoked, key_expired hoặc test_keys_retired. |
| 403 | account_inactive hoặc api_not_in_plan. |
| 429 | rate_limited: chờ số giây ghi trong Retry-After. |