開發者 API
程式化接碼 / 語音 / 查價 / 訂單管理。適合工作室、轉售商、自動化腳本。餘額預付、API 從同一錢包扣款。
API Keys
正在確認帳戶狀態…
API 文件(v1)
Base URL & 認證
所有請求帶 API key(下列二擇一);金額一律 TWD(與網站內部一致)。
Base: https://sms88.com.tw/api/v1
Authorization: Bearer sk_live_xxxxxxxx
# 或
X-API-Key: sk_live_xxxxxxxx端點
| 方法 | 路徑 | 說明 |
|---|---|---|
| GET | /balance | 查餘額 |
| GET | /prices?product=&country= | 查報價 + 庫存 |
| POST | /orders | 下單(type=sms|voice) |
| GET | /orders/{id} | 查狀態 + 驗證碼 |
| POST | /orders/{id}/cancel | 取消 + 退款 |
範例
# 下單(Google 美國)
curl -X POST https://sms88.com.tw/api/v1/orders \
-H "Authorization: Bearer sk_live_xxxx" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{"product":"google","country":"usa"}'
# → {"order_id":"...","number":"+1...","price_twd":75,"status":"PENDING",...}
# 輪詢取碼
curl https://sms88.com.tw/api/v1/orders/ORDER_ID -H "Authorization: Bearer sk_live_xxxx"
# → {"status":"RECEIVED","code":"123456",...}速率限制
預設每把 key 60 次/分鐘,超過回 429(附 Retry-After)。大量需求可聯繫調高。
錯誤格式
{ "error": "...", "message": "..." };401 未授權、429 限流、400 參數錯誤。下單失敗不扣款,並提供 20 分鐘餘額保障。
冪等:下單建議帶 Idempotency-Key header,重試同 key 不會重複下單。Idempotency 與扣款守恆與網站一致。