Cách Dùng API SMSCode (2026)

Cách Dùng API SMSCode (2026)

API SMSCode cho phép tự động hóa quy trình mua số ảo và nhận OTP mà không cần thao tác thủ công qua dashboard. Quốc gia, dịch vụ, giá IDR và số lượng hiện có phải được đọc từ catalog tại thời điểm chạy; khi gặp 429, hãy tuân theo Retry-After thay vì giả định một quota cố định.

TL;DR: API SMSCode là REST API chuẩn với Bearer Token auth. Ba endpoint cốt lõi: GET /v1/catalog/products (chọn sản phẩm), POST /v1/orders/create (mua số), GET /v1/orders/{id} (theo dõi OTP). Mỗi lần tạo đơn trả phí phải giữ nguyên body và Idempotency-Key cho đến khi kết quả được xác định.

Tại Sao Cần API Số Ảo?

Khi bạn cần xác minh hàng chục hoặc hàng trăm tài khoản, làm thủ công qua dashboard tốn quá nhiều thời gian. API giải quyết vấn đề này với một số use case quan trọng:

Test automation. Hệ thống QA cần xác minh đăng ký, đăng nhập, hoặc OTP flow — API tích hợp trực tiếp vào pipeline Selenium, Playwright, hoặc Puppeteer.

Quản lý nhiều tài khoản. Doanh nghiệp cần tạo và quản lý nhiều tài khoản cho các nền tảng khác nhau — API cho phép làm điều này có hệ thống và theo dõi được.

Sản phẩm phần mềm. Nếu bạn xây dựng công cụ automation hoặc dịch vụ khác cần xác minh số điện thoại, API SMSCode là hạ tầng nền tảng.

Tự động hóa workflow. API loại bỏ thao tác dashboard trong từng bước, nhưng thời gian OTP vẫn phụ thuộc hệ thống gửi và không được API đảm bảo.


Lấy API Key

Trước khi gọi API, bạn cần lấy API key:

  1. Đăng ký hoặc đăng nhập SMSCode
  2. Vào AccountAPI
  3. Tạo API key mới
  4. Copy key và lưu ở nơi an toàn — key chỉ hiển thị một lần

Bảo mật API key:

  • Không hardcode key vào code
  • Dùng biến môi trường: export SMSCODE_API_KEY="your_key_here"
  • Không commit key vào git (thêm vào .gitignore)
  • Rotate key định kỳ hoặc khi nghi ngờ bị lộ

Base URL Và Xác Thực

Base URL: https://api.smscode.gg/v1

Xác thực qua Bearer Token trong header HTTP:

Authorization: Bearer YOUR_API_KEY
Content-Type: application/json

Tất cả response trả về JSON với cấu trúc nhất quán:

{ "success": true, "data": {} }

Các Endpoint Chính

1. Kiểm Tra Số Dư

Kiểm tra số dư hiện tại trước khi đặt đơn:

GET /v1/balance

Response:

{
  "success": true,
  "data": {
    "currency": "IDR",
    "balance": 345000
  }
}

2. Tìm Số Khả Dụng (Catalog)

Truy vấn danh sách sản phẩm theo ID nền tảng và quốc gia:

GET /v1/catalog/products?country_id=7&platform_id=1 HTTP/1.1
Authorization: Bearer YOUR_API_KEY

Tham số:

  • platform_id: ID nền tảng lấy từ catalog
  • country_id: ID quốc gia lấy từ catalog

Response:

{
  "success": true,
  "data": [
    {
      "id": 1024,
      "name": "WhatsApp - Indonesia",
      "catalog_product_id": 88,
      "country_id": 7,
      "platform_id": 1,
      "available": 234,
      "price": 5000,
      "active": true
    }
  ],
  "meta": { "page": 1, "limit": 1000, "count": 1 }
}

3. Đặt Mua Số (Tạo Đơn Hàng)

Tạo đơn mua số; phone_number là field optional/nullable cho đến khi việc gán số hoàn tất:

POST /v1/orders/create HTTP/1.1
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
Idempotency-Key: order-example-001

{ "catalog_product_id": 88, "quantity": 1 }

Response:

{
  "success": true,
  "data": {
    "orders": [
      {
        "id": 90210,
        "status": "ACTIVE",
        "phone_number": "+6281234567890",
        "otp_code": null,
        "otp_received_at": null,
        "expires_at": "2026-03-16T10:20:00Z",
        "failed_reason": null,
        "product_id": 1024,
        "catalog_product_id": 88,
        "operator_id": null,
        "operator_name": null,
        "amount": 750000,
        "can_finish": false,
        "can_resend": false,
        "can_cancel": false,
        "can_replace": false,
        "can_reactivate": false,
        "resend_available_at": null,
        "cancel_available_at": "2026-03-16T10:02:00Z",
        "replace_available_at": "2026-03-16T10:02:00Z"
      }
    ],
    "failed_count": 0
  }
}

Ví dụ trên minh họa một đơn đã được gán số. Chỉ nhập phone_number vào dịch vụ đích khi field là string không rỗng. Nếu create đã resolve nhưng field bị thiếu, là null hoặc chỉ có khoảng trắng, thực hiện tối đa một GET /v1/orders/{id} có timeout với đúng cùng integer id; nếu vẫn chưa có số, dừng ở kết quả cục bộ pending_assignment và không phát lại paid create. Nếu kết quả create không rõ ràng, không đổi sản phẩm, quốc gia, body hoặc idempotency key.

4. Lấy OTP (Poll Đơn Hàng)

Gọi endpoint này theo interval có giới hạn do ứng dụng cấu hình để kiểm tra OTP:

GET /v1/orders/90210 HTTP/1.1
Authorization: Bearer YOUR_API_KEY

Projection V1OrderSummary khi chờ (chỉ các trường được chọn, không phải wire response đầy đủ):

{
  "success": true,
  "data": {
    "status": "ACTIVE",
    "otp_code": null,
    "otp_message": null,
    "sms_revision": 0,
    "can_cancel": true
  }
}

Projection V1OrderSummary khi OTP đến (chỉ các trường được chọn, không phải wire response đầy đủ):

{
  "success": true,
  "data": {
    "status": "OTP_RECEIVED",
    "otp_code": "847291",
    "otp_message": "Mã xác minh của bạn là 847291",
    "sms_revision": 1,
    "can_cancel": false
  }
}

otp_code có thể là null ngay cả khi trạng thái là OTP_RECEIVED, ví dụ khi tin nhắn chỉ chứa đường dẫn đăng nhập. Với từng order, khởi tạo last_seen_revision = -1. Chỉ consume tin nhắn và cập nhật state khi sms_revision là integer tường minh, không phải boolean, lớn hơn nghiêm ngặt revision đã thấy và otp_message là string không rỗng. Thực hiện bước này trước khi xét COMPLETED, CANCELED hoặc EXPIRED, độc lập với OTP_RECEIVEDotp_code; revision không hợp lệ, cũ/bằng hoặc message rỗng không được làm state tiến lên.

5. Hủy Đơn Hàng

Chỉ hủy khi snapshot mới nhất trả về can_cancel: true:

POST /v1/orders/cancel HTTP/1.1
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json

{ "id": 90210 }

Response:

{
  "success": true,
  "data": {
    "order_id": 90210,
    "status": "CANCELED",
    "refund_amount": 750000,
    "new_balance": 2000000
  }
}

Code Mẫu — Python

Đây là implementation đầy đủ bằng Python với error handling:

import os
import time
import uuid
import requests

API_KEY = os.environ.get("SMSCODE_API_KEY")
BASE_URL = "https://api.smscode.gg/v1"
ORDER_TIMEOUT = (5, 30)
HEADERS = {
    "Authorization": f"Bearer {API_KEY}",
    "Content-Type": "application/json"
}


def check_balance():
    """Kiểm tra số dư tài khoản."""
    r = requests.get(f"{BASE_URL}/balance", headers=HEADERS)
    r.raise_for_status()
    return r.json()["data"]["balance"]


def find_product(platform_id: int, country_id: int):
    """Tìm product ID phù hợp."""
    r = requests.get(
        f"{BASE_URL}/catalog/products",
        params={"platform_id": platform_id, "country_id": country_id},
        headers=HEADERS
    )
    r.raise_for_status()
    products = [
        product for product in r.json()["data"]
        if product["available"] > 0
        and type(product.get("catalog_product_id")) is int
    ]
    if not products:
        raise ValueError("Không có sản phẩm khả dụng với catalog_product_id hợp lệ")
    return min(products, key=lambda p: p["price"])


def buy_number(catalog_product_id: int):
    """Mua số và lấy số điện thoại."""
    request_body = {"catalog_product_id": catalog_product_id, "quantity": 1}
    idempotency_key = str(uuid.uuid4())
    create_headers = {**HEADERS, "Idempotency-Key": idempotency_key}
    r = requests.post(
        f"{BASE_URL}/orders/create",
        json=request_body,
        headers=create_headers,
        timeout=ORDER_TIMEOUT,
    )
    r.raise_for_status()
    order = r.json()["data"]["orders"][0]

    # `phone_number` là optional/nullable cho đến khi việc gán số hoàn tất. Đơn đã
    # resolved vẫn resolved: một lần đọc giới hạn với cùng id, không bao giờ tạo
    # thêm một create trả phí.
    if not is_assigned(order.get("phone_number")):
        current = requests.get(
            f"{BASE_URL}/orders/{order['id']}",
            headers=HEADERS,
            timeout=ORDER_TIMEOUT,
        ).json()
        if current.get("success"):
            order["phone_number"] = current["data"].get("phone_number")
    return order


def is_assigned(phone) -> bool:
    return isinstance(phone, str) and bool(phone.strip())


def wait_for_otp(order_id: int, timeout: int = 120) -> dict | None:
    """Poll cho đến khi nhận được OTP hoặc hết timeout."""
    start = time.time()
    last_seen_revision = -1
    while time.time() - start < timeout:
        r = requests.get(
            f"{BASE_URL}/orders/{order_id}",
            headers=HEADERS,
            timeout=ORDER_TIMEOUT,
        )
        r.raise_for_status()
        data = r.json()["data"]

        status = data["status"]
        revision = data.get("sms_revision")
        message = data.get("otp_message")

        # OTP_RECEIVED và otp_code không phải điều kiện để consume message.
        if (
            type(revision) is int
            and revision > last_seen_revision
            and isinstance(message, str)
            and message.strip()
        ):
            last_seen_revision = revision
            return {
                "otp_code": data.get("otp_code"),
                "otp_message": message,
                "sms_revision": revision,
            }
        if status in ("COMPLETED", "EXPIRED", "CANCELED"):
            return None

        time.sleep(5)  # Poll mỗi 5 giây

    return None  # Timeout


def cancel_order(order_id: int):
    """Chỉ hủy khi server cho phép."""
    current = requests.get(
        f"{BASE_URL}/orders/{order_id}",
        headers=HEADERS,
        timeout=ORDER_TIMEOUT,
    )
    current.raise_for_status()
    if not current.json()["data"]["can_cancel"]:
        return current.json()["data"]
    r = requests.post(
        f"{BASE_URL}/orders/cancel",
        json={"id": order_id},
        headers=HEADERS,
        timeout=ORDER_TIMEOUT,
    )
    r.raise_for_status()
    return r.json()["data"]


# Ví dụ sử dụng đầy đủ
def verify_with_telegram():
    # 1. Tìm số
    product = find_product(platform_id=1, country_id=7)
    print(f"Tìm thấy sản phẩm: Rp {product['price']:,}")

    # 2. Mua số
    order = buy_number(product["catalog_product_id"])
    print(f"Order ID: {order['id']}")
    if not is_assigned(order.get("phone_number")):
        # pending_assignment: đơn vẫn resolved và đã bị trừ tiền; đừng nhập số
        # vào đâu cả và đừng tạo đơn mới.
        print(f"pending_assignment: đơn {order['id']} chưa được gán số")
        return

    print(f"Số điện thoại: {order['phone_number']}")

    # 3. TODO: Nhập order['phone_number'] vào Telegram để yêu cầu OTP

    # 4. Chờ OTP
    print("Đang chờ OTP...")
    delivery = wait_for_otp(order["id"])

    if delivery:
        print(f"Tin nhắn nhận được: {delivery['otp_message']}")
        # 5. TODO: Nhập OTP vào Telegram
    else:
        print("Không nhận được OTP — kiểm tra quyền hủy")
        cancel_order(order["id"])

    return delivery


if __name__ == "__main__":
    balance = check_balance()
    print(f"Số dư: Rp {balance:,}")
    verify_with_telegram()

Code Mẫu — JavaScript (Node.js)

const { Agent, fetch } = require('undici');

const API_KEY = process.env.SMSCODE_API_KEY;
const crypto = require('crypto');
const BASE_URL = 'https://api.smscode.gg/v1';
const orderDispatcher = new Agent({ connectTimeout: 5_000 });
const orderTransport = () => ({
  dispatcher: orderDispatcher,
  signal: AbortSignal.timeout(30_000)
});
const headers = {
  'Authorization': `Bearer ${API_KEY}`,
  'Content-Type': 'application/json'
};

async function apiCall(method, path, body = null, extraHeaders = {}) {
  const opts = {
    method,
    headers: { ...headers, ...extraHeaders },
    ...orderTransport()
  };
  if (body) opts.body = JSON.stringify(body);
  const res = await fetch(`${BASE_URL}${path}`, opts);
  const data = await res.json();
  if (!data.success) throw new Error(data.error.message);
  return data.data;
}

async function findProduct(platformId, countryId) {
  const query = `?platform_id=${platformId}&country_id=${countryId}`;
  const products = await apiCall('GET', `/catalog/products${query}`);
  const purchasable = products.filter(
    product => product.available > 0 && Number.isInteger(product.catalog_product_id)
  );
  if (!purchasable.length) {
    throw new Error('Không có sản phẩm khả dụng với catalog_product_id hợp lệ');
  }
  return purchasable.sort((a, b) => a.price - b.price)[0];
}

async function buyNumber(catalogProductId) {
  const requestBody = { catalog_product_id: catalogProductId, quantity: 1 };
  const idempotencyKey = crypto.randomUUID();
  const data = await apiCall('POST', '/orders/create', requestBody, {
    'Idempotency-Key': idempotencyKey
  });
  const order = data.orders[0];

  // `phone_number` là optional/nullable cho đến khi việc gán số hoàn tất: một lần
  // đọc giới hạn với cùng id, không bao giờ tạo thêm một create trả phí.
  return order;
}

function isAssigned(phone) {
  return typeof phone === 'string' && phone.trim() !== '';
}

async function waitForOtp(orderId, timeoutMs = 120000) {
  const start = Date.now();
  let lastSeenRevision = -1;
  while (Date.now() - start < timeoutMs) {
    const data = await apiCall('GET', `/orders/${orderId}`);
    const { status, sms_revision: revision, otp_message: message } = data;

    // OTP_RECEIVED và otp_code không phải điều kiện để consume message.
    if (
      Number.isInteger(revision) &&
      revision > lastSeenRevision &&
      typeof message === 'string' &&
      message.trim()
    ) {
      lastSeenRevision = revision;
      return {
        otpCode: data.otp_code,
        otpMessage: message,
        smsRevision: revision
      };
    }
    if (['COMPLETED', 'EXPIRED', 'CANCELED'].includes(status)) return null;
    await new Promise(r => setTimeout(r, 5000)); // Đợi 5 giây
  }
  return null;
}

async function cancelOrder(orderId) {
  const current = await apiCall('GET', `/orders/${orderId}`);
  if (!current.can_cancel) return current;
  return apiCall('POST', '/orders/cancel', { id: orderId });
}

// Sử dụng
(async () => {
  try {
    const product = await findProduct(1, 7);
    console.log(`Giá: Rp ${product.price}`);

    const order = await buyNumber(product.catalog_product_id);
    if (!isAssigned(order.phone_number)) {
      // pending_assignment: đơn vẫn resolved và đã bị trừ tiền; đừng nhập số
      // vào đâu cả và đừng tạo đơn mới.
      console.log(`pending_assignment: đơn ${order.id} chưa được gán số`);
      return;
    }
    console.log(`Số điện thoại: ${order.phone_number}`);

    // Nhập order.phone_number vào dịch vụ đích tại đây...

    const delivery = await waitForOtp(order.id);
    if (delivery) {
      console.log(`Tin nhắn: ${delivery.otpMessage}`);
    } else {
      await cancelOrder(order.id);
      console.log('Đã kiểm tra điều kiện hủy đơn.');
    }
  } catch (err) {
    console.error('Lỗi:', err.message);
  }
})();

Code Mẫu — cURL

Dùng để test nhanh từ terminal:

# Kiểm tra số dư
curl -H "Authorization: Bearer $SMSCODE_API_KEY" \
  https://api.smscode.gg/v1/balance

# Tìm sản phẩm theo platform_id và country_id
curl -H "Authorization: Bearer $SMSCODE_API_KEY" \
  "https://api.smscode.gg/v1/catalog/products?platform_id=1&country_id=7"

# Mua số; tạo IDEMPOTENCY_KEY một lần và giữ nguyên nếu cần đối soát
curl -X POST \
  --connect-timeout 5 --max-time 30 \
  -H "Authorization: Bearer $SMSCODE_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $IDEMPOTENCY_KEY" \
  -d '{"catalog_product_id": 88, "quantity": 1}' \
  https://api.smscode.gg/v1/orders/create

# Lấy OTP (thay ORDER_ID bằng ID thực)
curl -H "Authorization: Bearer $SMSCODE_API_KEY" \
  --connect-timeout 5 --max-time 30 \
  https://api.smscode.gg/v1/orders/ORDER_ID

# Hủy đơn chỉ sau khi GET trả về can_cancel=true
curl -X POST \
  --connect-timeout 5 --max-time 30 \
  -H "Authorization: Bearer $SMSCODE_API_KEY" \
  -H "Content-Type: application/json" \
  -d "{\"id\":$ORDER_ID}" \
  https://api.smscode.gg/v1/orders/cancel

Xử Lý Lỗi

Các mã lỗi phổ biến và cách xử lý:

Mã lỗi Ý nghĩa Cách xử lý
INSUFFICIENT_BALANCE Số dư không đủ Nạp thêm tiền
VALIDATION_ERROR Request hoặc product ID không hợp lệ Kiểm tra lại catalog và body
NO_OFFER_AVAILABLE Sản phẩm đã chọn không còn offer Dừng request này; chỉ tạo request mới sau một lựa chọn rõ ràng
NOT_FOUND Order ID không tồn tại Kiểm tra lại order ID
CONFLICT Request xung đột với trạng thái hiện tại Đọc lại trạng thái đơn
RATE_LIMIT_EXCEEDED Quá nhiều request Giảm tần suất, thêm delay
UNAUTHORIZED API key sai hoặc hết hạn Kiểm tra và rotate API key

Retry Logic Thông Minh

import json


DEFINITIVE_CREATE_ERRORS = {
    "NO_OFFER_AVAILABLE",
    "VALIDATION_ERROR",
    "PROVIDER_ERROR",
    "IDEMPOTENCY_KEY_REUSED",
}


def classify_create_error(error_code: str) -> str:
    if error_code in DEFINITIVE_CREATE_ERRORS:
        return "definitive"
    if error_code == "INSUFFICIENT_BALANCE":
        return "stop"
    if error_code == "REQUEST_IN_PROGRESS":
        return "retry_same_request"
    return "ambiguous"


def recovery_evidence(
    endpoint: str,
    request_body: dict,
    idempotency_key: str,
    attempts: int,
) -> dict:
    return {
        "endpoint": endpoint,
        "request_body": request_body,
        "idempotency_key": idempotency_key,
        "attempts": attempts,
    }


def create_error_decision(
    error_code: str,
    endpoint: str,
    request_body: dict,
    idempotency_key: str,
    attempts: int,
) -> dict:
    action = classify_create_error(error_code)
    decision = {
        "action": action,
        "recovery": recovery_evidence(
            endpoint, request_body, idempotency_key, attempts
        ),
    }
    if action == "retry_same_request":
        decision["retry"] = {
            "request_body": request_body,
            "idempotency_key": idempotency_key,
        }
    return decision


def parse_create_payload(
    raw_body: bytes,
    endpoint: str,
    request_body: dict,
    idempotency_key: str,
    attempts: int,
) -> dict:
    evidence = recovery_evidence(
        endpoint, request_body, idempotency_key, attempts
    )
    try:
        payload = json.loads(raw_body.decode("utf-8"))
    except (UnicodeDecodeError, json.JSONDecodeError):
        return {"action": "ambiguous", "payload": None, "recovery": evidence}
    return {"action": "parsed", "payload": payload, "recovery": evidence}

Chỉ REQUEST_IN_PROGRESS được retry có giới hạn với đúng body và Idempotency-Key ban đầu. INSUFFICIENT_BALANCE dừng sau một POST. Mọi mã khác, mã tương lai, JSON hỏng hoặc UTF-8 không hợp lệ đều fail closed: lưu endpoint, body, key và tổng số lần thử để đối soát, không chuyển sang sản phẩm hay quốc gia khác.


Best Practices Và Rate Limits

Rate Limits

Không giả định một quota cố định cho từng endpoint. Khi API trả về 429, hãy dùng giá trị Retry-After dương; nếu header thiếu hoặc không hợp lệ, dùng một khoảng chờ dự phòng có giới hạn. Giới hạn concurrency và tốc độ trong chính ứng dụng của bạn.

Polling Thông Minh

Đừng poll liên tục mỗi giây — đây là cách lãng phí request và có thể bị rate limit:

# Đây là cấu hình cục bộ của ứng dụng, không phải quota do API cam kết.
POLL_INTERVAL_SECONDS = 5
MAX_POLL_SECONDS = 120

Timeout Hợp Lý

Đặt timeout tổng có giới hạn phù hợp với workflow. Khi hết timeout, đọc snapshot mới nhất; chỉ gửi yêu cầu hủy nếu can_cancel=true. Không tự động tạo đơn mới khi kết quả của đơn trước chưa rõ ràng.

Xử Lý Song Song

Nếu cần xử lý nhiều số đồng thời, dùng asyncio (Python) hoặc Promise.all (JavaScript):

// Xử lý 5 đơn hàng song song
const orders = await Promise.all([
  buyNumber(productId),
  buyNumber(productId),
  buyNumber(productId),
  buyNumber(productId),
  buyNumber(productId)
]);

Tích Hợp Với Test Automation

Đây là use case phổ biến nhất với developers:

Playwright (Python)

from playwright.sync_api import sync_playwright
import time

def test_telegram_signup():
    product = find_product(platform_id=1, country_id=7)
    order = buy_number(product["catalog_product_id"])
    phone = order.get("phone_number")
    if not is_assigned(phone):
        # pending_assignment: đừng mở form đăng ký khi chưa có số; đơn vẫn
        # resolved và không tạo thêm create trả phí.
        print(f"pending_assignment: đơn {order['id']} chưa được gán số")
        return

    with sync_playwright() as p:
        browser = p.chromium.launch()
        page = browser.new_page()

        # Điều hướng đến Telegram Web
        page.goto("https://web.telegram.org/")

        # Nhập số điện thoại
        page.fill('[type="tel"]', phone)
        page.click('button[type="submit"]')

        # Chờ OTP
        time.sleep(5)
        delivery = wait_for_otp(order["id"])
        assert delivery is not None, "OTP không đến"

        # Nhập OTP
        page.fill('.input-field-input', delivery["otp_code"] or delivery["otp_message"])

        # Xác nhận thành công
        page.wait_for_selector('.chat-list')
        print("Telegram đăng nhập thành công!")

        browser.close()

FAQ

API có hỗ trợ webhook không?

Có. Xác minh header X-Webhook-Signature theo định dạng sha256={hex} trên raw request bytes trước khi parse JSON. Dùng so sánh constant-time, xử lý đủ các nhánh sự kiện, rồi persist hoặc enqueue bền vững trước khi trả 2xx. Polling GET /v1/orders/{id} vẫn nên được dùng để đối soát nếu webhook bị trễ hoặc mất.

Có thể dùng API từ browser (JavaScript phía client) không?

Không khuyến nghị — vì sẽ lộ API key cho người dùng. Chỉ nên gọi API từ phía server (Node.js backend, Python script, v.v.).

Làm thế nào để test mà không tốn nhiều tiền?

Dùng quốc gia có giá thấp nhất (Indonesia, Ấn Độ, Nga) cho môi trường dev. Khi production ready, chuyển sang quốc gia tốt nhất cho dịch vụ cụ thể.

API có tài liệu Swagger/OpenAPI không?

Có — truy cập tài liệu API sau khi đăng nhập. Tài liệu được cập nhật với các endpoint, tham số và ví dụ response hiện hành.

Tôi cần xử lý volume lớn — nên kiểm soát tải thế nào?

Giới hạn concurrency trong ứng dụng, theo dõi phản hồi 429, và tôn trọng Retry-After với fallback có giới hạn. Không suy ra capacity cố định từ một lần chạy thử.


API SMSCode cho phép bạn tích hợp số ảo vào bất kỳ workflow nào — từ test automation đến production service. Đăng ký SMSCode và lấy API key miễn phí. Đọc thêm nhận SMS online — hướng dẫn đầy đủ để hiểu thêm về quy trình nhận OTP, hoặc số ảo cho kinh doanh để khám phá use case thực tế.

Sẵn sàng thử SMSCode?

Tạo tài khoản và nhận số ảo đầu tiên trong chưa đầy hai phút.

Bắt đầu →