डेवलपर्स

API v2

एक एंडपॉइंट, केवल POST, JSON में जवाब। वही कैटलॉग और वही कीमतें जो पैनल में हैं — अपनी साइट, बॉट या स्प्रेडशीट से।

पहले जानने लायक चार बातें

01

आपकी की ही आपका बटुआ है

इसे अकाउंट पेज पर जेनरेट करें। यह खर्च को अधिकृत करती है, इसलिए इसकी जगह सर्वर कॉन्फ़िग में है। अगर यह कभी किसी ब्राउज़र, चैट या स्क्रीनशॉट में आ गई हो तो इसे बदल दें।

02

लिमिट हर सेवा की अलग होती है

न्यूनतम और अधिकतम मात्रा अलग-अलग तय होती है — एक सेवा 10 यूनिट से शुरू होती है, अगली 500 000 से। इन्हें services से पढ़ें और ऑर्डर भेजने से पहले जाँच लें।

03

ऑर्डर बैलेंस से खर्च होते हैं

इनवॉइस वाला कोई चरण नहीं है। add तभी तक सफल होता है जब तक बैलेंस ऑर्डर को कवर करता है, इसलिए 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 को अपनी रिफ़ंड लॉजिक में मैप करें। किसी आंशिक डिलीवरी को पूर्ण के रूप में चिह्नित करना चार्जबैक कमाने का सबसे तेज़ तरीका है।

आपने एक असली ऑर्डर को शुरू से अंत तक देखा है

कैटलॉग जितना छोटा ऑर्डर अनुमति दे उतना दें, उसे पूरा होने तक पोल करें, और ट्रैफ़िक स्विच करने से पहले पुष्टि करें कि आपकी ओर का हिसाब charge से पाई-पाई तक मेल खाता है।

पूरा संदर्भ, पैनल द्वारा जेनरेट किया गया

API

HTTP मेथड POST
API URL 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 कोड का उदाहरण