เอกสารสำหรับนักพัฒนา

API smmto.com

ผสานบริการของเราเข้ากับแพลตฟอร์มของคุณโดยตรงด้วย REST API อันทรงพลัง รวดเร็ว เชื่อถือได้ และใช้งานง่าย สร้างเครื่องมือเติบโตหรือแผงรีเซลเลอร์ของคุณวันนี้

Uptime 99.9%
เวลาตอบสนอง <200ms
ปริมาณ 50M+

1. เริ่มต้นใช้งาน

API ของเราสร้างบนหลักการ REST ใช้รหัสตอบกลับ HTTP มาตรฐาน การยืนยันตัวตน และคำกริยา คำขอทั้งหมดควรส่งไปที่ Base URL และจะตอบกลับในรูปแบบ JSON

Base URL: https://smmto.com/api/v2

2. การยืนยันตัวตน

เพื่อยืนยันคำขอ คุณต้องใส่คีย์ API ที่ไม่ซ้ำกันเป็นพารามิเตอร์ `key` ในทุกคำขอ คุณสามารถหาคีย์ได้ในแดชบอร์ดบัญชี

POST https://smmto.com/api/v2
Content-Type: application/json

{
  "key": "your-api-key-here",
  "action": "services"
}

เก็บคีย์ API เป็นความลับ อย่าแชร์ในที่เก็บสาธารณะ โค้ดฝั่งไคลเอนต์ หรือเอกสาร หากถูกเปิดเผย ให้สร้างใหม่ทันที

3. เพิ่มออเดอร์

POST /api/v2

สั่งออเดอร์ใหม่สำหรับบริการโซเชียลมีเดียใดก็ได้ที่มีบนแพลตฟอร์มของเรา

พารามิเตอร์ ประเภท จำเป็น คำอธิบาย
keystringYesYour unique API key
actionstringYes"add"
serviceintegerYesService ID (from Services List)
linkstringYesTarget URL (e.g. Channel link)
quantityintegerYesTotal quantity to deliver

ตัวอย่างคำขอ

{
  "key": "your-api-key",
  "action": "add",
  "service": 1,
  "link": "https://t.me/yourchannel",
  "quantity": 1000
}

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

{
  "order": 23501,
  "status": "success"
}

4. สถานะออเดอร์

POST /api/v2

ตรวจสอบสถานะและความคืบหน้าของออเดอร์ที่สั่งไว้ก่อนหน้า

พารามิเตอร์ ประเภท จำเป็น คำอธิบาย
keystringYesYour API key
actionstringYes"status"
orderintegerYesThe ID of the order
{
  "charge": "0.5000",
  "start_count": "1200",
  "status": "In Progress",
  "remains": "450",
  "currency": "USD"
}

5. หลายออเดอร์

POST /api/v2

ประสิทธิภาพสำคัญ ใช้ bulk endpoint เพื่อสั่งได้สูงสุด 100 ออเดอร์ในหนึ่งครั้งเรียก API

{
  "key": "your-api-key",
  "action": "add_bulk",
  "orders": [
    { "service": 1, "link": "link_1", "quantity": 100 },
    { "service": 2, "link": "link_2", "quantity": 250 }
  ]
}

6. Cancel Order

POST /api/v2

Cancel a pending or in-progress order by order ID.

{
  "key": "your-api-key",
  "action": "cancel",
  "order": 23501
}

7. Refill Order

POST /api/v2

Request a refill for eligible orders that dropped below the guaranteed level.

{
  "key": "your-api-key",
  "action": "refill",
  "order": 23501
}

8. Services List

POST /api/v2

Retrieve the full list of available services, rates, min/max quantities, and metadata.

{
  "key": "your-api-key",
  "action": "services"
}

9. รหัสข้อผิดพลาด

API ใช้รหัสสถานะ HTTP มาตรฐานเพื่อบ่งชี้ความสำเร็จหรือความล้มเหลว

รหัส ข้อความ คำอธิบาย
400Invalid requestMissing or invalid parameters
401Invalid API keyAuthentication failed
404Service not foundInvalid service ID
429Rate limit exceededToo many requests
500Internal errorServer-side error

10. Rate Limits

API requests are limited to 100 requests per minute per API key. Exceeding this limit returns HTTP 429. Contact support for higher throughput on reseller plans.

11. SDK และไลบรารี

12. Changelog

v2.0 — Unified REST endpoint at /api/v2 with bulk orders, refill status, and improved error responses.

เมธอด Panel API

Service list

POST /api/v2 services
พารามิเตอร์ คำอธิบาย
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

POST /api/v2 add

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

{
    "order": 23501
}

Order status

POST /api/v2 status
พารามิเตอร์ คำอธิบาย
key Your API key
action status
order Order ID

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

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

Multiple orders status

POST /api/v2 multi_status
พารามิเตอร์ คำอธิบาย
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

POST /api/v2 refill
พารามิเตอร์ คำอธิบาย
key Your API key
action refill
order Order ID

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

{
    "refill": "1"
}

Create multiple refill

POST /api/v2 multi_refill
พารามิเตอร์ คำอธิบาย
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

POST /api/v2 refill_status
พารามิเตอร์ คำอธิบาย
key Your API key
action refill_status
refill Refill ID

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

{
    "status": "Completed"
}

Get multiple refill status

POST /api/v2 multi_refill_status
พารามิเตอร์ คำอธิบาย
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

POST /api/v2 cancel
พารามิเตอร์ คำอธิบาย
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

POST /api/v2 balance
พารามิเตอร์ คำอธิบาย
key Your API key
action balance

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

{
    "balance": "100.84292",
    "currency": "USD"
}
ตัวอย่างโค้ด PHP
แชทสด ซัพพอร์ต 24/7