Nhà phát triển

API v2

Một endpoint, chỉ POST, trả về JSON. Cùng danh mục và cùng giá bạn thấy trong bảng, từ trang, bot hoặc bảng tính của bạn.

Bốn điều cần biết trước tiên

01

Khóa của bạn là ví của bạn

Tạo nó trên trang tài khoản. Nó cấp quyền chi tiêu, nên chỗ của nó là trong cấu hình máy chủ. Hãy đổi nó nếu nó từng lọt vào trình duyệt, một cuộc trò chuyện hay một ảnh chụp màn hình.

02

Giới hạn áp dụng theo từng dịch vụ

Số lượng tối thiểu và tối đa được đặt riêng — một dịch vụ bắt đầu từ 10 đơn vị, dịch vụ kế tiếp từ 500 000. Hãy đọc chúng từ services và kiểm tra trước khi gửi đơn.

03

Đơn hàng tiêu vào số dư

Không có bước hóa đơn. add chỉ thành công khi số dư còn đủ cho đơn hàng, vì vậy hãy poll balance và dừng hàng đợi trước khi nó về không.

04

Đã có panel? Không cần code

PerfectPanel và hầu hết các script panel đọc định dạng này một cách tự nhiên. Trong admin của bạn, vào Providers → Add provider và dán địa chỉ trang webhttps://autosmo.com/, chỉ vậy thôi, không phải endpoint. Thêm khóa của bạn, đồng bộ danh mục, đặt mức lời của bạn.

Một yêu cầu, từ đầu đến cuối

ví dụ chi tiết
đặt một đơn và đọc lại nó
curl -X POST https://autosmo.com/api/v2 \\
  -d key=YOUR_KEY \\
  -d action=add \\
  -d service=6758 \\
  -d link=https://instagram.com/yourprofile \\
  -d quantity=100

{"order": 8231455}

curl -X POST https://autosmo.com/api/v2 -d key=YOUR_KEY -d action=status -d order=8231455

{"charge": "0.016", "start_count": "2841", "status": "Completed",
 "remains": "0", "currency": "USD"}

Dịch vụ 6758 là một id thật trong danh mục. Số lượng dưới mức tối thiểu của một dịch vụ bị từ chối, không được làm tròn lên.

Giao nó cho một agent

sao chép & dán

Dán cái này vào ChatGPT, Claude hoặc Cursor, nêu ngôn ngữ của bạn, và bạn có một client hoạt động được. Nó mang theo toàn bộ danh sách lệnh gọi cùng những hành vi dễ làm sai.

prompt tích hợp
Build me a client for the AutoSMO SMM API (v2), in a language I will name.

ENDPOINT
POST https://autosmo.com/api/v2 — form-encoded body, JSON response, no other verbs.
Authentication is the field `key`, sent with every call. Server-side only.

CALLS
action=services -> array of { service, name, type, category, rate (per 1000),
                              min, max, refill:bool, cancel:bool }
action=add      params: service, link, quantity [, runs, interval]  -> { "order": id }
                custom comments: service, link, comments
action=status   params: order | orders (comma separated, max 100)
                -> { charge, start_count, status, remains, currency }
action=refill   params: order | orders (max 100)   -> { "refill": id }
action=refill_status  params: refill | refills     -> { "status": ... }
action=cancel   params: orders (max 100)
action=balance                                      -> { balance, currency }

BEHAVIOUR THAT COSTS MONEY IF IGNORED
- A timed-out `add` is not a failed `add`. The order may exist and be paid for.
  Surface it for a human; do not resend it on a timer.
- Quantity outside a service's own min/max is refused outright, so read those
  bounds from the catalogue and check before sending.
- Status is polled with `orders` and up to 100 ids at once. Per-order polling
  works in testing and dies in production.
- A 200 response can still contain per-entry errors when several ids were
  requested. Walk the entries; do not trust the envelope.
- "Partial" is a delivery that stopped early: `remains` is the shortfall and
  `charge` is the real cost. Pass that difference back to your buyer.
- Refill and cancel exist only where the catalogue flags say so.

WHAT I EXPECT FROM YOU
- One function per call, with the response parsed into typed structures.
- My order reference stored next to the id this API returns.
- Two background jobs: refresh the catalogue, and follow orders still open.
- A rehearsal switch that logs calls without sending them, and a single
  end-to-end test using the cheapest service in the catalogue.

Danh sách kiểm tra trước khi lên live

Khóa không nằm trong bất cứ thứ gì khách hàng có thể mở

Không trong JavaScript front-end, không trong bundle di động, không trong kho lưu trữ công khai. Bất kỳ ai giữ nó đều có thể đặt đơn trừ vào số dư của bạn.

Timeout được đưa vào hàng đợi cho con người, không thử lại

add không có khóa idempotency, một lần thử lại tự động là cách một đơn của khách hàng trở thành hai đơn đã trả tiền.

Bản sao danh mục của bạn làm mới theo lịch

Giá, giới hạn và tình trạng sẵn có thay đổi khi nhà cung cấp thay đổi của họ. Một bản sao cục bộ lỗi thời bán theo mức giá bạn không còn nữa.

Đơn giao một phần đến tay khách hàng của bạn dưới dạng một phần

Ánh xạ remains vào logic hoàn tiền của riêng bạn. Đánh dấu một lần giao một phần là đã hoàn thành là cách nhanh nhất để chuốc lấy một chargeback.

Bạn đã theo dõi một đơn hàng thật từ đầu đến cuối

Đặt đơn nhỏ nhất mà danh mục cho phép, poll nó đến khi hoàn tất, và xác nhận phía bạn khớp với charge đến từng xu trước khi chuyển lưu lượng sang.

Tài liệu tham chiếu đầy đủ, do panel tạo ra

API

Phương thức HTTP POST
URL API https://autosmo.com/api/v2
Định dạng phản hồi JSON

Service list

Parameters Description
key Your API key
action services

Ví dụ phản hồi

[
    {
        "service": 1,
        "name": "Followers",
        "type": "Default",
        "category": "First Category",
        "rate": "0.90",
        "min": "50",
        "max": "10000",
        "refill": true,
        "cancel": true
    },
    {
        "service": 2,
        "name": "Comments",
        "type": "Custom Comments",
        "category": "Second Category",
        "rate": "8",
        "min": "10",
        "max": "1500",
        "refill": false,
        "cancel": true
    }
]

Add order

Ví dụ phản hồi

{
    "order": 23501
}

Order status

Parameters Description
key Your API key
action status
order Order ID

Ví dụ phản hồi

{
    "charge": "0.27819",
    "start_count": "3572",
    "status": "Partial",
    "remains": "157",
    "currency": "USD"
}

Multiple orders status

Parameters Description
key Your API key
action status
orders Order IDs (separated by a comma, up to 100 IDs)

Ví dụ phản hồi

{
    "1": {
        "charge": "0.27819",
        "start_count": "3572",
        "status": "Partial",
        "remains": "157",
        "currency": "USD"
    },
    "10": {
        "error": "Incorrect order ID"
    },
    "100": {
        "charge": "1.44219",
        "start_count": "234",
        "status": "In progress",
        "remains": "10",
        "currency": "USD"
    }
}

Create refill

Parameters Description
key Your API key
action refill
order Order ID

Ví dụ phản hồi

{
    "refill": "1"
}

Create multiple refill

Parameters Description
key Your API key
action refill
orders Order IDs (separated by a comma, up to 100 IDs)

Ví dụ phản hồi

[
    {
        "order": 1,
        "refill": 1
    },
    {
        "order": 2,
        "refill": 2
    },
    {
        "order": 3,
        "refill": {
            "error": "Incorrect order ID"
        }
    }
]

Get refill status

Parameters Description
key Your API key
action refill_status
refill Refill ID

Ví dụ phản hồi

{
    "status": "Completed"
}

Get multiple refill status

Parameters Description
key Your API key
action refill_status
refills Refill IDs (separated by a comma, up to 100 IDs)

Ví dụ phản hồi

[
    {
        "refill": 1,
        "status": "Completed"
    },
    {
        "refill": 2,
        "status": "Rejected"
    },
    {
        "refill": 3,
        "status": {
            "error": "Refill not found"
        }
    }
]

Create cancel

Parameters Description
key Your API key
action cancel
orders Order IDs (separated by a comma, up to 100 IDs)

Ví dụ phản hồi

[
    {
        "order": 9,
        "cancel": {
            "error": "Incorrect order ID"
        }
    },
    {
        "order": 2,
        "cancel": 1
    }
]

User balance

Parameters Description
key Your API key
action balance

Ví dụ phản hồi

{
    "balance": "100.84292",
    "currency": "USD"
}
Ví dụ mã PHP