Tài liệu API proxy, tự động hóa đơn hàng và thông tin kết nối
SMMProxy Developer API cung cấp kiểm tra số dư, báo giá, đặt proxy, danh sách thông tin kết nối qua HTTPS REST. Tạo key tại menu API Key trên dashboard và gửi trong Authorization header với Bearer key.
Bắt đầu
- Tạo tài khoản và hoàn thành lần nạp tiền đầu tiên. API key chỉ có thể được tạo từ tài khoản đã có ít nhất một lần nạp tiền.
- Tạo khóa mới từ menu API key trên bảng điều khiển. Khóa chỉ hiển thị một lần khi tạo, vì vậy hãy lưu lại ngay.
- Thêm khóa Authorization: Bearer vào mọi yêu cầu. Phản hồi là JSON và luôn có trường ok.
Địa chỉ cơ bản: https://smmproxy.io/api/v1
curl -H "Authorization: Bearer smpk_YOUR_KEY" https://smmproxy.io/api/v1/balance
GET/api/v1/balance
Kiểm tra số dư
Ví dụ phản hồi
{ "ok": true, "balance": "48.20", "currency": "USD" }GET/api/v1/products
Tra cứu sản phẩm, quốc gia, giá
Ví dụ phản hồi
{ "ok": true, "periods": ["1w","2w","1m","2m","3m","6m","9m","12m"],
"products": [{ "product": "isp", "unit": "ip", "countries": [{ "country": "us", "monthly": "1.29" }] }] }POST/api/v1/orders
Đặt hàng proxy (thanh toán bằng số dư)
Nội dung yêu cầu
{ "product": "isp", "country": "us", "quantity": 5, "period": "1m" }Ví dụ phản hồi
{ "ok": true, "order": { "id": "OR-7K2M-Q8XD4P", "product": "isp", "country": "us",
"quantity": 5, "period": "1m", "total": "6.45", "expires_at": "2026-11-21T09:00:00.000Z" } }GET/api/v1/orders
Danh sách đơn hàng (100 gần nhất)
Ví dụ phản hồi
{ "ok": true, "orders": [{ "id": "OR-7K2M-Q8XD4P", "status": "active", "total": "6.45" }] }GET/api/v1/proxies?order=OR-7K2M-Q8XD4P
Danh sách thông tin kết nối
Ví dụ phản hồi
{ "ok": true, "proxies": [{ "host": "198.51.100.24", "http_port": 10842, "socks5_port": 20842,
"username": "u7kq2m", "password": "Xc81pLq0Zr", "country": "us", "expires_at": "..." }] }Giá trị đơn
| Tên | Định dạng | Mô tả |
|---|---|---|
| product | string | isp, mobile, ipv4, residential |
| country | string | Mã quốc gia 2 chữ cái thường (us, gb, de ...) |
| quantity | integer | Số IP·cổng, residential tính bằng GB |
| period | string | 1w 2w 1m 2m 3m 6m 9m 12m (không áp dụng residential) |
| protocol | string | http hoặc socks5, mặc định http (cả hai port đều được cấp) |
Lỗi
| HTTP | error | Ý nghĩa |
|---|---|---|
| 401 | unauthorized | Khóa không tồn tại hoặc không khớp. Tiền sẽ không bị trừ. |
| 400 | invalid_request | Vui lòng kiểm tra lại sản phẩm, quốc gia, số lượng và thời gian. Tiền sẽ không bị trừ. |
| 402 | insufficient_balance | Số dư thấp hơn số tiền thanh toán. Vui lòng nạp thêm tiền và thử lại. Tiền sẽ không bị trừ. |
| 503 | network_error | Lỗi mạng khi gửi đơn hàng. Tiền sẽ không bị trừ và bạn có thể thử lại sau. |
| 429 | rate_limited | Gửi tối đa 300 lần mỗi phút. |
Ví dụ Python
import requests
API = "https://smmproxy.io/api/v1"
H = {"Authorization": "Bearer smpk_YOUR_KEY"}
order = requests.post(f"{API}/orders", headers=H, json={
"product": "isp", "country": "us", "quantity": 5, "period": "1m"}).json()
if order["ok"]:
proxies = requests.get(f"{API}/proxies", headers=H, params={"order": order["order"]["id"]}).json()
for p in proxies["proxies"]:
print(f'{p["host"]}:{p["http_port"]}:{p["username"]}:{p["password"]}')Ví dụ Node.js
const API = "https://smmproxy.io/api/v1";
const H = { Authorization: "Bearer smpk_YOUR_KEY", "Content-Type": "application/json" };
const r = await fetch(API + "/orders", { method: "POST", headers: H,
body: JSON.stringify({ product: "mobile", country: "gb", quantity: 1, period: "1m" }) });
const j = await r.json();
console.log(j.ok ? j.order.id : j.error);