API Hosting
Thông tin chung về API
Endpoint:https://portal.trungtamdev.com/api/v19/hosting
Phương thức HTTP:
POST
Content-Type:application/x-www-form-urlencoded
Định dạng phản hồi:
JSON
Xác thực Authorization:Authorization: Bearer {auth_token}auth_token={token}
Lấy auth_token tại trang profile
🔒 Cảnh báo bảo mật
- auth_token là chìa khóa truy cập tài khoản - vui lòng bảo mật tuyệt đối
- Không chia sẻ auth_token với bất kỳ ai, kể cả nhân viên hỗ trợ
- Thay đổi auth_token thường xuyên để tăng cường bảo mật
- Nếu nghi ngờ bị lộ, hãy thay đổi ngay lập tức
- Thông tin VPS và tài khoản chỉ hiển thị cho chủ tài khoản
Actions hỗ trợ: services, buy, renew
action=services: lấy danh sách gói hostingaction=buy: tham sốid,domain,selectedMonths,coupon(tuỳ chọn)action=renew: tham sốid,coupon(tuỳ chọn)
JSON mẫu
Request (services)
{
"auth_token": "YOUR_TOKEN",
"action": "services"
}
Response (success)
{
"status": "success",
"message": "Danh sách gói hosting",
"data": [{"id":1,"name":"HOST STARTER","price_per_month":20000}]
}
Request (buy)
{
"auth_token": "YOUR_TOKEN",
"action": "buy",
"id": 1,
"domain": "example.com",
"selectedMonths": 12,
"coupon": "HOST10"
}
Request (renew)
{
"auth_token": "YOUR_TOKEN",
"action": "renew",
"id": 123,
"coupon": "RENEW5"
}