Tài Liệu Kết Nối API v2

v2.0 • Standard API

Chuẩn kết nối JSON / Form-URL-Encoded cho Bot, Website và Child Panel (Reseller).

Đã chuyển đổi tiền tệ hiển thị sang: US Dollar (USD)
USD Base
https://vnsocial.site/api/v2
Rate limit: 120 req/phút
POST

Lấy danh sách dịch vụ

Trả về danh sách dịch vụ đang hoạt động kèm giá niêm yết trên 1.000 đơn vị (đã tự động tính chiết khấu VIP / Custom Rate). Dữ liệu cache 30 giây theo từng tài khoản.

Tham sốKiểuMô tả
key *stringAPI Key cá nhân
action *stringGiá trị: services
POST

Tạo đơn hàng mới

Anti-duplicate 60s

Tạo đơn hàng và trừ tiền tự động theo công thức (rate × quantity × runs) / 1000. Chọn loại dịch vụ bên dưới để xem tham số tương ứng:

Tham sốKiểuMô tả
service *intMã ID dịch vụ
link *stringURL bài viết / video / trang đích
quantity *intSố lượng cần đặt (trong khoảng min – max)
runsintSố đợt chạy (2 – 100, tùy chọn với Web Traffic)
intervalintPhút giữa các đợt (1 – 10080, mặc định 60)
Ghi chú—Không cần quantity. Hệ thống tính giá cố định theo gói.
comments *stringMỗi bình luận 1 dòng (\n). Tự đếm số dòng làm quantity.
hashtag *stringHashtag hoặc từ khóa tìm kiếm (VD: #smmpanel).
usernames / hashtagsstringDùng usernames (custom list), thêm hashtags hoặc username (user followers).
username *stringUsername của người viết bình luận cần tăng like.
answer_number *intSố thứ tự phương án bình chọn (≥ 1).
keywords *stringDanh sách từ khóa SEO, mỗi dòng 1 từ khóa (\n).
country *stringMã hoặc tên quốc gia (VD: VN, US, United States).
device *int1 Desktop, 2 Android, 3 iOS, 4 Mixed Mobile, 5 Mixed All.
type_of_traffic *int1 Google Keyword, 2 Custom Referrer, 3 Blank Referrer.
google_keyword / referring_urlstringBắt buộc google_keyword nếu type=1, hoặc referring_url nếu type=2.
username, posts *string / intUsername theo dõi và số bài đăng mới (≥ 1).
min, max, delay, expiryint / dateSố lượng mỗi bài, độ trễ (phút), hạn (d/m/Y).
quantity *intSố xu cần nạp — bắt buộc là bội số của 100 (VD: 100, 200, 500, 1000).
tiktok_account_id / link *int / stringGửi tiktok_account_id (đã liên kết qua tiktok_qr_generate / tiktok_add_cookie) HOẶC truyền thẳng chuỗi Cookie TikTok vào trường link.
Actions hỗ trợ QRactiontiktok_qr_generate → tiktok_qr_status (session_id) hoặc tiktok_add_cookie (cookie).
POST

Kiểm tra trạng thái đơn hàng

Hỗ trợ tra cứu 1 đơn (order) hoặc tối đa 100 đơn trong 1 lần gọi (orders cách nhau bằng dấu phẩy) để tối ưu Rate Limit.

Tham sốKiểuMô tả
orderintMã ID của 1 đơn hàng cần kiểm tra.
ordersstringDanh sách ID cách nhau bằng dấu phẩy (VD: 23501,23502).
POST

Tạo yêu cầu bảo hành (Refill)

Chỉ áp dụng cho dịch vụ có refill: true và đơn hàng đang ở trạng thái Completed.

Tham sốKiểuMô tả
action *stringGiá trị: refill
order *intID đơn hàng cần bảo hành.
POST

Kiểm tra trạng thái bảo hành

Tra cứu tiến độ xử lý của yêu cầu bảo hành dựa theo mã refill nhận được từ action refill.

Tham sốKiểuMô tả
action *stringGiá trị: refill_status
refill *intMã ID yêu cầu bảo hành.
POST

Hủy đơn hàng & Hoàn tiền

Hủy 1 hoặc tối đa 100 đơn hàng cùng lúc. Chỉ các đơn ở trạng thái Pending mới hủy được và tự động hoàn tiền 100% về ví ngay lập tức.

Tham sốKiểuMô tả
action *stringGiá trị: cancel
orders / order *string1 ID hoặc danh sách ID cách nhau bằng dấu phẩy (tối đa 100).
POST

Kiểm tra số dư tài khoản

Trả về số dư ví khả dụng hiện tại của tài khoản theo đơn vị tiền tệ gốc (USD).

Tham sốKiểuMô tả
key *stringAPI Key cá nhân
action *stringGiá trị: balance
JSON Response mẫu 200 OK
[
  {
    "service": 101,
    "name": "Instagram Real Followers [HQ]",
    "type": "Default",
    "category": "Instagram Followers",
    "rate": "0.8500",
    "min": 100,
    "max": 50000,
    "refill": true,
    "cancel": true,
    "dripfeed": true
  }
]
// Thành công:
{ "order": 23501 }

// Khi không đủ số dư:
{ "error": "Not enough funds on balance" }
// Tra cứu 1 đơn (order=23501):
{
  "charge": "0.8500",
  "start_count": 1240,
  "status": "In progress",
  "remains": 350,
  "currency": "USD"
}
{
  "refill": 512
}
{
  "status": "Completed"
}
[
  { "order": 23501, "cancel": 1 },
  { "order": 23502, "cancel": { "error": "Order cannot be canceled at this stage" } }
]
{
  "balance": "100.8429",
  "currency": "USD"
}

Trạng thái đơn hàng (status)

Pending Đơn mới tạo, chờ đẩy sang nguồn. Có thể hủy qua API.
Processing Đã gửi sang nguồn, đang xếp hàng chuẩn bị chạy.
In progress Đơn đang trong quá trình tăng tương tác.
Completed Đã hoàn thành đủ số lượng đặt hàng.
Partial Chạy một phần, tự động hoàn tiền phần remains.
Canceled Đơn đã hủy và hoàn tiền 100% về ví.

Trạng thái bảo hành (refill_status)

Pending Đã tiếp nhận yêu cầu bảo hành, chờ xử lý.
In progress Máy chủ đang tiến hành chạy bù tương tác.
Completed Đã bảo hành hoàn tất.
Rejected Bị từ chối (không đủ điều kiện hoặc link riêng tư).
Error Lỗi kết nối nguồn, vui lòng thử lại hoặc báo hỗ trợ.

Tích hợp Nạp Xu TikTok cho SMM Panel đối tác (type: tiktok_coin)

Các máy chủ Nạp Xu TikTok được phân phối dưới dạng dịch vụ SMM có type = "tiktok_coin" (đơn giá tính trên 1.000 xu, số lượng đặt phải là bội số của 100). Panel đối tác có thể chọn 1 trong 2 cách kết nối:

Reseller Ready
CÁCH 1 Chuẩn SMM 100% (Gửi Cookie trong trường link)

Dành cho mọi SMM Panel không cần sửa code: chỉ cần gửi action=add như đơn SMM thường, truyền chuỗi Cookie TikTok vào link và số xu (bội số 100) vào quantity.

POST https://vnsocial.site/api/v2
{
  "key": "YOUR_API_KEY",
  "action": "add",
  "service": 1001,
  "link": "sessionid=abc123...; tt_csrf_token=...",
  "quantity": 500
}
// Response: { "order": 12345 }
CÁCH 2 Luồng Quét QR / Mở App TikTok (Khuyên dùng)

Gọi tiktok_qr_generate → hiển thị ảnh QR / nút Mở TikTok cho khách → poll tiktok_qr_status tới khi status = "done" để nhận tiktok_account_id → gửi đơn với action=add kèm tiktok_account_id.

// 1. Tạo QR: action=tiktok_qr_generate
// -> { "session_id": "...", "qr_image": "data:...", "open_app_url": "..." }

// 2. Kiểm tra QR: action=tiktok_qr_status & session_id=...
// -> { "status": "done", "account": { "tiktok_account_id": 7, "username": "user1" } }

// 3. Đặt đơn: action=add & service=1001 & tiktok_account_id=7 & quantity=500
// -> { "order": 12345 }

Bảng Mã Lỗi Thường Gặp

Mọi lỗi trả về theo định dạng {"error": "..."}.

HTTP Thông báo lỗi Cách khắc phục
400API key is required / Incorrect requestKiểm tra lại tham số key và action.
401Invalid or inactive API keyAPI Key sai, đã được tạo mới hoặc tài khoản bị khóa.
403IP address [...] is not whitelistedThêm IP server vào mục IP Whitelist trong Hồ sơ.
422Nội dung bình luận / liên kết vi phạm quy định...Nội dung bị bộ lọc kiểm duyệt chặn, vui lòng chỉnh sửa sạch.
429Rate limit exceeded / IP lockedGiảm tần suất dưới 120 req/phút, gom đơn bằng orders.
200Not enough funds on balanceSố dư ví không đủ, vui lòng nạp thêm tiền.
200Duplicate order detected...Trùng đơn trong 60 giây. Chờ 1 phút hoặc kiểm tra retry.

Danh sách 13 Loại dịch vụ (type) hỗ trợ trên API v2

Giá trị trường type trả về từ action=services và các tham số bắt buộc khi gọi action=add.

Loại dịch vụ (type) Tham số bắt buộc khi tạo đơn (action=add)
Defaultservice, link, quantity (tùy chọn: runs, interval)
Packageservice, link
Custom Commentsservice, link, comments
Custom Comments Packageservice, link, comments
Mentions Hashtagservice, link, quantity, hashtag
Mentions with Hashtagsservice, link, quantity, usernames, hashtags
Mentions Custom Listservice, link, usernames
Mentions User Followersservice, link, quantity, username
Comment Likesservice, link, quantity, username
Pollservice, link, quantity, answer_number
SEOservice, link, quantity, keywords
Web Trafficservice, link, quantity, country, device, type_of_traffic, google_keyword / referring_url
Subscriptionsservice, username, posts, min, max (tùy chọn: delay, expiry)
Nạp Xu TikTok (tiktok_coin)service, quantity (bội số 100), tiktok_account_id hoặc link (Cookie TikTok)

Rate Limit: 120 requests / phút

Giới hạn áp dụng theo từng tài khoản API. Khi vượt ngưỡng sẽ trả về HTTP 429. Hãy dùng orders để kiểm tra cùng lúc tối đa 100 đơn.

IP Whitelist (Bảo vệ API Key)

Cho phép giới hạn chỉ IP máy chủ của bạn được phép gọi API trong mục Hồ sơ. Mọi IP khác sẽ bị chặn với HTTP 403 kể cả khi lộ Key.

Chống trùng đơn hàng (60 giây)

Hệ thống tự động từ chối nếu cùng 1 tài khoản gửi trùng service, link và quantity trong vòng 60 giây, giúp tránh mất tiền oan khi mạng chập chờn.

Chống Brute-Force & Cache 30s

Gửi sai API Key nhiều lần liên tiếp sẽ tự động khóa IP tạm thời. Endpoint services được cache 30 giây riêng theo tài khoản để đảm bảo tốc độ phản hồi nhanh nhất.

Thư Viện SDK Tích Hợp Nhanh
<?php
class SmmApiClient {
    public function __construct(
        private string $apiUrl = 'https://vnsocial.site/api/v2',
        private string $apiKey = 'YOUR_API_KEY'
    ) {}

    public function services(): array { return $this->request(['action' => 'services']); }
    public function balance(): array { return $this->request(['action' => 'balance']); }
    public function order(array $data): array { return $this->request(array_merge(['action' => 'add'], $data)); }
    public function status(int $orderId): array { return $this->request(['action' => 'status', 'order' => $orderId]); }
    public function multiStatus(array $ids): array { return $this->request(['action' => 'status', 'orders' => implode(',', $ids)]); }
    public function refill(int $orderId): array { return $this->request(['action' => 'refill', 'order' => $orderId]); }
    public function refillStatus(int $refillId): array { return $this->request(['action' => 'refill_status', 'refill' => $refillId]); }
    public function cancel(array $ids): array { return $this->request(['action' => 'cancel', 'orders' => implode(',', $ids)]); }

    private function request(array $payload): array {
        $ch = curl_init($this->apiUrl);
        curl_setopt_array($ch, [
            CURLOPT_RETURNTRANSFER => true,
            CURLOPT_POST => true,
            CURLOPT_TIMEOUT => 30,
            CURLOPT_POSTFIELDS => http_build_query(array_merge(['key' => $this->apiKey], $payload)),
        ]);
        $result = curl_exec($ch);
        curl_close($ch);
        return json_decode($result ?: '{}', true) ?? [];
    }
}
import requests

class SmmApiClient:
    def __init__(self, api_url="https://vnsocial.site/api/v2", api_key="YOUR_API_KEY"):
        self.api_url = api_url
        self.api_key = api_key

    def _post(self, **params):
        res = requests.post(self.api_url, data={"key": self.api_key, **params}, timeout=30)
        return res.json()

    def services(self): return self._post(action="services")
    def balance(self): return self._post(action="balance")
    def add_order(self, service, link, quantity, **extra):
        return self._post(action="add", service=service, link=link, quantity=quantity, **extra)
    def status(self, order_id): return self._post(action="status", order=order_id)
    def multi_status(self, ids): return self._post(action="status", orders=",".join(map(str, ids)))
    def refill(self, order_id): return self._post(action="refill", order=order_id)
    def refill_status(self, refill_id): return self._post(action="refill_status", refill=refill_id)
    def cancel(self, ids): return self._post(action="cancel", orders=",".join(map(str, ids)))

Thông báo dành cho bạn

SMM1S SHOPGiới thiệu SMM1S SHOP

Tài khoản số cho mọi nhu cầu

SMM1S SHOP cung cấp đa dạng tài khoản và gói dịch vụ số phục vụ AI, thiết kế, chỉnh sửa video, giải trí, học tập và làm việc. Khám phá ChatGPT, CapCut, Netflix, YouTube Premium, Claude, Grok, Gemini, Antigravity, CodeX,... cùng nhiều lựa chọn khác ngay trên bot Telegram của shop.


HoanCash.comGiới thiệu HoanCash.com

Mua sắm, nhận thêm tiền hoàn

HoanCash.com là website mua sắm hoàn tiền, giúp bạn nhận tiền hoàn khi mua hàng trên Shopee & TikTok Shop. Truy cập website để xem hướng dẫn và điều kiện áp dụng.


🛡️ Đã cọc bảo hiểm tại Checkscam

Bạn có thể xem thông tin tại đây.

💰 Giá dịch vụ cạnh tranh

Chúng tôi sẵn sàng cập nhật giá dịch vụ cạnh tranh cho các thành viên trong hệ thống.

💬 Góp ý & hỗ trợ dịch vụ

Liên hệ Telegram: @smmpanelvi