นักพัฒนา

API v2

หนึ่งเอนด์พอยต์ POST เท่านั้น ตอบกลับเป็น JSON แคตตาล็อกและราคาเดียวกับในแผง สั่งจากเว็บ บอท หรือสเปรดชีตของคุณ

สี่สิ่งที่ควรรู้ก่อน

01

คีย์ของคุณคือกระเป๋าเงินของคุณ

สร้างมันบน หน้าบัญชี มันอนุญาตการใช้จ่าย จึงควรอยู่ในคอนฟิกของเซิร์ฟเวอร์ เปลี่ยนมันหากมันเคยผ่านเบราว์เซอร์ แชท หรือภาพหน้าจอ

02

ลิมิตแยกตามแต่ละบริการ

จำนวนต่ำสุดและสูงสุดถูกตั้งแยกกัน — บริการหนึ่งเริ่มที่ 10 หน่วย อีกบริการเริ่มที่ 500 000 อ่านค่าจาก services และตรวจสอบก่อนส่งคำสั่งซื้อ

03

คำสั่งซื้อหักจากยอดคงเหลือ

ไม่มีขั้นตอนออกใบแจ้งหนี้ add จะสำเร็จก็ต่อเมื่อยอดคงเหลือครอบคลุมคำสั่งซื้อเท่านั้น ดังนั้นให้ poll balance และหยุดคิวก่อนที่มันจะถึงศูนย์

04

มีแผงอยู่แล้ว? ไม่ต้องเขียนโค้ด

PerfectPanel และสคริปต์แผงส่วนใหญ่อ่านรูปแบบนี้ได้โดยตรง ในแอดมินของคุณไปที่ Providers → Add provider แล้ววาง ที่อยู่เว็บไซต์https://autosmo.com/ แค่นั้น ไม่ใช่ endpoint เพิ่มคีย์ของคุณ ซิงค์แคตตาล็อก ตั้งส่วนต่างของคุณ

หนึ่งคำขอ ตั้งแต่ต้นจนจบ

ตัวอย่างที่ทำให้ดู
สั่งซื้อและอ่านกลับมา
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"}

บริการ 6758 เป็น id จริงจากแคตตาล็อก จำนวนที่ต่ำกว่าค่าต่ำสุดของบริการจะถูกปฏิเสธ ไม่ใช่ปัดขึ้น

ส่งต่อให้เอเจนต์

คัดลอก & วาง

วางสิ่งนี้ลงใน ChatGPT, Claude หรือ Cursor ระบุภาษาของคุณ แล้วคุณจะได้ไคลเอนต์ที่ใช้งานได้ มันมาพร้อมรายการเรียกทั้งหมด บวกกับพฤติกรรมที่ผิดพลาดได้ง่าย

พรอมป์ต์การเชื่อมต่อ
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.

เช็กลิสต์ก่อนขึ้นใช้งานจริง

คีย์ไม่อยู่ในสิ่งใดที่ลูกค้าเปิดดูได้

ไม่อยู่ใน JavaScript ฝั่งหน้าเว็บ ไม่อยู่ในบันเดิลมือถือ ไม่อยู่ในรีโพสาธารณะ ใครก็ตามที่ถือมันไว้สามารถสั่งซื้อโดยหักจากยอดคงเหลือของคุณได้

ไทม์เอาต์จะถูกจัดคิวให้คนดู ไม่ใช่ลองใหม่อัตโนมัติ

เนื่องจาก add ไม่มีคีย์ idempotency การลองใหม่อัตโนมัติจึงเป็นวิธีที่คำสั่งซื้อของลูกค้าหนึ่งรายการกลายเป็นสองรายการที่จ่ายเงินแล้ว

สำเนาแคตตาล็อกของคุณรีเฟรชตามกำหนดเวลา

อัตรา ลิมิต และความพร้อมจำหน่ายเปลี่ยนเมื่อซัพพลายเออร์เปลี่ยนของพวกเขา สำเนาในเครื่องที่ล้าสมัยจะขายในราคาที่คุณไม่มีอีกต่อไป

คำสั่งซื้อบางส่วนไปถึงลูกค้าของคุณแบบบางส่วน

แมป remains เข้ากับลอจิกการคืนเงินของคุณเอง การทำเครื่องหมายการส่งบางส่วนว่าเสร็จสมบูรณ์คือวิธีที่เร็วที่สุดในการเรียกเก็บเงินคืน

คุณได้เฝ้าดูคำสั่งซื้อจริงหนึ่งรายการจนจบ

สั่งซื้อรายการเล็กที่สุดที่แคตตาล็อกอนุญาต poll จนเสร็จสมบูรณ์ และยืนยันว่าฝั่งของคุณตรงกับ charge ทุกสตางค์ก่อนสลับทราฟฟิก

เอกสารอ้างอิงฉบับเต็ม สร้างโดยแผง

API

เมธอด HTTP POST
URL ของ API https://autosmo.com/api/v2
รูปแบบการตอบกลับ JSON

Service list

Parameters Description
key Your API key
action services

ตัวอย่างการตอบกลับ

[
    {
        "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

ตัวอย่างการตอบกลับ

{
    "order": 23501
}

Order status

Parameters Description
key Your API key
action status
order Order ID

ตัวอย่างการตอบกลับ

{
    "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)

ตัวอย่างการตอบกลับ

{
    "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

ตัวอย่างการตอบกลับ

{
    "refill": "1"
}

Create multiple refill

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

ตัวอย่างการตอบกลับ

[
    {
        "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

ตัวอย่างการตอบกลับ

{
    "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)

ตัวอย่างการตอบกลับ

[
    {
        "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)

ตัวอย่างการตอบกลับ

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

User balance

Parameters Description
key Your API key
action balance

ตัวอย่างการตอบกลับ

{
    "balance": "100.84292",
    "currency": "USD"
}
ตัวอย่างโค้ด PHP