開発者向け

API v2

エンドポイント一つ、POSTのみ、JSONで返却。パネルと同じカタログ・同じ価格を、自分のサイト・ボット・表計算から。

まず知っておくべき4つのこと

01

キーはあなたの財布です

アカウントページで生成してください。支出を承認するものなので、サーバー設定に置くべきです。ブラウザ、チャット、スクリーンショットに一度でも触れたなら、必ずローテーションしてください。

02

上限はサービスごとです

最小数量と最大数量は個別に設定されます。あるサービスは10個から、次は500 000個から始まります。servicesから読み取り、注文を送る前に検証してください。

03

注文は残高から消費します

請求書のステップはありません。addは残高が注文を賄える間だけ成功するので、balanceをポーリングし、ゼロになる前にキューを止めてください。

04

すでにパネルをお持ちですか?コード不要です

PerfectPanelとほとんどのパネルスクリプトはこの形式をそのまま読み込みます。管理画面でProviders → Add providerに進み、サイトアドレスを貼り付けてください — https://autosmo.com/、それだけで、endpointではありません。キーを追加し、カタログを同期し、マージンを設定してください。

1つのリクエストを最初から最後まで

実例
注文を出して読み返す
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には冪等キーがないため、自動再試行は1件の顧客注文が2件の支払い済み注文になる原因です。

あなたのカタログのコピーはスケジュールで更新されます

供給元が自分のレート、上限、在庫を変えると、これらも変わります。古いローカルコピーは、もう手元にない価格で販売してしまいます。

部分注文は顧客にも部分のまま届きます

remainsを自分の返金ロジックにマッピングしてください。部分配送を完了と記録することは、チャージバックを招く最速の方法です。

実際の注文を最初から最後まで見届けた

カタログが許す最小の注文を出し、完了までポーリングし、トラフィックを切り替える前に、あなたの側がchargeと1セント単位で一致することを確認してください。

パネルが生成した完全なリファレンス

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コードの例