Pwodwi nan API
Numè, mesaj ak pri, direktman soti nan aplikasyon ou.
kòmanse ak yon solisyon
Kòmite yon API kouvè nan panèl ou, jwenn yon numè ak tcheke pou mesaj an chak 20 sekond. Pwodwi se kredite lè yon SMS ak yon kòd an rive; re-lè li pa kontwole balan ou.
https://smscash.org/api/v1https://smscash.org/stubs/handler_api.phpcurl -X POST 'https://smscash.org/api/v1/activations' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: request-unique-001' \
-d '{"service":"go","country":86}'Alternatif konpatib an nan konplè: /handler_api.php. Integrasyon REST ki gen nan travay.
Zouti pou kreye demann
Idempotency-Key: UUID · POST · 8–128
Chwa otomatik: plis kòd nan dènye èdtan an, apre sa nan 24 èdtan. Pa gen nimewo: pwochen operatè.
curl --max-time 15 --fail-with-body -X POST 'https://smscash.org/api/v1/activations' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: request-unique-001' \
--data '{"service":"go","country":86}'package main
import (
"bytes"
"fmt"
"io"
"net/http"
"os"
"time"
)
func main() {
payload := []byte("{\"service\":\"go\",\"country\":86}")
req, err := http.NewRequest("POST", "https://smscash.org/api/v1/activations", bytes.NewReader(payload))
if err != nil { panic(err) }
req.Header.Set("Authorization", "Bearer " + os.Getenv("SMSCASH_API_KEY"))
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Idempotency-Key", "request-unique-001")
client := &http.Client{Timeout: 15 * time.Second, CheckRedirect: func(_ *http.Request, _ []*http.Request) error { return http.ErrUseLastResponse }}
res, err := client.Do(req)
if err != nil { panic(err) } // Keep the same operation key after a network error.
defer res.Body.Close()
body, err := io.ReadAll(res.Body)
if err != nil { panic(err) }
if res.StatusCode >= 300 {
fmt.Fprintf(os.Stderr, "HTTP %d, request_id=%s\n%s\n", res.StatusCode, res.Header.Get("X-Request-ID"), body)
os.Exit(1)
}
fmt.Println(string(body))
}// Node.js 18+: set SMSCASH_API_KEY in your environment.
const response = await fetch("https://smscash.org/api/v1/activations", {
method: "POST",
headers: {
Authorization: 'Bearer ' + process.env.SMSCASH_API_KEY,
'Content-Type': 'application/json',
'Idempotency-Key': "request-unique-001",
},
body: JSON.stringify({
"service": "go",
"country": 86
}),
signal: AbortSignal.timeout(15000),
redirect: 'error',
});
const result = await response.json();
if (!response.ok) {
const error = result.error || {};
console.error(response.status, error.code, error.hint, error.request_id);
throw new Error(error.message || 'API error');
}
console.log(result);
// SMS codes are strings: keep leading zeros. Never retry writes automatically.import json
import os
import urllib.error
import urllib.request
class NoRedirect(urllib.request.HTTPRedirectHandler):
def redirect_request(self, req, fp, code, msg, headers, newurl):
return None
headers = {
'Authorization': 'Bearer ' + os.environ['SMSCASH_API_KEY'],
'Content-Type': 'application/json',
'Idempotency-Key': "request-unique-001",
}
request = urllib.request.Request(
"https://smscash.org/api/v1/activations",
headers=headers,
data="{\"service\":\"go\",\"country\":86}".encode('utf-8'),
method="POST",
)
try:
with urllib.request.build_opener(NoRedirect).open(request, timeout=15) as response:
result = json.load(response)
print(result)
except urllib.error.HTTPError as error:
details = json.load(error).get('error', {})
print(error.code, details.get('code'), details.get('hint'), details.get('request_id'))
raise
# No automatic retries; SMS codes remain strings.Kle a pa konsève. Verifikasyon sa a pa bay nimewo.
REST pou nouvo integrasyon
Sèvis ak peyi
Kòm yon sèvis ak peyi. Payment pa SMS depann nan peyi a.
GET /api/v1/catalog?service=go&country=86&page=1&page_size=100
Authorization: Bearer YOUR_API_KEY{
"rows": [
{
"offer_id": 42,
"service": "go",
"service_name": "Google",
"country_id": 86,
"country_name": "Italy",
"provider_id": 1,
"operator": 1,
"provider_name": "Operator 1",
"reward": "0.00300000",
"currency": "USD",
"accounting_precision": 8,
"earnings_hold_days": 45
}
],
"page": 1,
"page_size": 100,
"total": 1,
"pages": 1,
"has_more": false,
"accounting_precision": 8
}service · country · operator · q · page · page_size (1–100)
Kòm yon numè
POST /api/v1/activations
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
Idempotency-Key: request-unique-001
{
"service": "go",
"country": 86
}Chwa otomatik: plis kòd nan dènye èdtan an, apre sa nan 24 èdtan. Pa gen nimewo: pwochen operatè.
201: new session · 200: replay of the same operation
service + country OR offer_id · duration_minutes: 20
ref: software owner code (optional)
operator: public ID (e.g. 1 for Operator 1), optional · any/0: automatic
country: integer · service: string · SMS code: stringNumè se valè pou 20 minit. SMS se tcheke chak 20 sekond. Ou ka anonse sou detann.
Verifye plizyè nimewo
GET /api/v1/activations/batch?ids=42,43
Authorization: Bearer YOUR_API_KEY{
"rows": [
{
"id": 42,
"found": true,
"phone": "12025550123",
"status": "received",
"service": "go",
"country_id": 86,
"provider_id": 1,
"operator": 1,
"expires_at": "2026-10-10T12:15:00Z",
"sms_count": 1,
"code": "001234",
"last_sms": {
"id": 101,
"code": "001234",
"sender": "Service",
"text": "Code: 001234",
"received_at": "2026-10-10T12:01:00Z"
}
},
{
"id": 43,
"found": false,
"error": {
"code": "NO_ACTIVATION",
"message": "Session not found."
}
}
],
"as_of": "2026-10-10T12:01:00Z",
"poll_interval_seconds": 20
}ids: 1–100 positive session IDs, separated by commas
Input order preserved · duplicates removed
Foreign, unavailable or out-of-scope IDs: found=false
Read only · no supplier requests · last_sms is the latest messageBalans · Lajan bloke
GET /api/v1/balance
Authorization: Bearer YOUR_API_KEY{
"currency": "USD",
"accounting_precision": 8,
"balance": "12.00000000",
"held_balance": "34.50000001",
"balance_minor": "1200000000",
"held_minor": "3450000001",
"as_of": "2026-10-12T20:00:00Z",
"next_release_at": "2026-11-26T20:00:00Z"
}balance — Disponib; held_balance — Lajan bloke. USD · 8
Ou ka retire sèlman lajan ki fin pase peryòd atant li.
Kliyan pare pou itilize
import {SmScash, SmScashError} from './smscash.mjs';
import {randomUUID} from 'node:crypto';
const api = new SmScash(process.env.SMSCASH_API_KEY);
const catalog = await api.catalog({service: 'go', country: 86});
console.log(catalog.rows);
// Save this key before sending; keep it for retries of this operation.
const requestKey = randomUUID();
const session = await api.createNumber({service: 'go', country: 86}, requestKey);
// After 20 seconds:
const messages = await api.sms(session.id, {afterId: 0});
console.log(messages.sms);
const statuses = await api.batch([session.id]);
const held = await api.holdBalance();
console.log(held); // Exact USD stringimport os
import uuid
from smscash import SmScash, SmScashError
api = SmScash(os.environ['SMSCASH_API_KEY'])
catalog = api.catalog(service='go', country=86)
print(catalog['rows'])
# Save this key before sending; keep it for retries of this operation.
request_key = str(uuid.uuid4())
session = api.create_number({'service': 'go', 'country': 86}, request_key)
# After 20 seconds:
messages = api.sms(session['id'], after_id=0)
print(messages['sms'])
statuses = api.batch([session['id']])
held = api.hold_balance()
print(held) # Exact USD stringme() · balance() · holdBalance()/hold_balance() · catalog() · activation() · sms() · batch()
createNumber(parameters, requestKey) / create_number(parameters, request_key)
setStatus(id, "cancel") / set_status(id, "cancel")
setStatus(id, "retry", requestKey) / set_status(id, "retry", request_key)
Timeout: 15 s · no dependencies · no automatic retries
Error: code · status · hint · requestId/request_id · retryable
ALLOCATION_UNCERTAIN: contact support with request_id; never retry automatically.SMS-Activate / HeroSMS
https://smscash.org/sms-activate/stubs/handler_api.phphttps://smscash.org/hero-sms/stubs/handler_api.phpKle API pèsonèl itilizatè a.
Kòm yon sèvis ak peyi. Payment pa SMS depann nan peyi a.
| Kòd | Deskripsyon |
|---|---|
getNumber / getNumberV2 | Kòm yon numè |
getStatus / getStatusV2 | Kòm yo nan dènye |
setStatus / finishActivation / cancelActivation | Seyasyon Managè |
getPrices / getNumbersStatus | Kontrole nan disponibite |
getRewards (SMScash) | Pwodwi pou SMS |
getServicesList / getServices | Sèvis |
getCountries / getOperators | Sèvis ak peyi |
getActiveActivations | sezyon |
getBalance | Balans itilizatè a |
getHoldBalance (SMScash) | Lajan bloke |
cost = 0 USD · activationCost = 0 USDreward — Pwodwi pou SMS
curl --get 'https://smscash.org/hero-sms/stubs/handler_api.php' \
--data-urlencode 'api_key=YOUR_API_KEY' \
--data-urlencode 'action=getNumberV2' \
--data-urlencode 'service=go' \
--data-urlencode 'country=86' \
-H 'Idempotency-Key: request-unique-001'{
"activationId": "42",
"phoneNumber": "393331234567",
"activationCost": 0,
"currency": 840,
"countryCode": 86,
"canGetAnotherSms": true,
"activationTime": "2026-10-11T12:00:00Z",
"activationEndTime": "2026-10-11T12:15:00Z",
"reward": "0.00300000"
}GET or POST application/x-www-form-urlencoded
api_key · action · service · country · ref (optional)
setStatus: 1 → ACCESS_READY · 3 → ACCESS_RETRY_GET
6 → ACCESS_ACTIVATION · 8 → ACCESS_CANCEL
getStatus: STATUS_WAIT_CODE · STATUS_OK:001234 · STATUS_CANCEL
getStatusV2: {"verificationType":1,"sms":null,"call":null}
getServicesList: {"status":"success","services":[{"code":"go","name":"Google"}]}
getCountries: {"86":{"id":86,"eng":"Italy","visible":1,"retry":1,"rent":0}}
getPrices: {"86":{"go":{"cost":0,"count":12,"reward":"0.00300000","currency":"USD"}}}
getRewards: {"59":{"vi":{"1":"0.01000000"}}}
getRewards filters: country · service · operator (optional); any/0: all permitted providers
getActiveActivations: start=0 · limit=1–100 · activeActivations / data
Business/key errors: HTTP 200 + plain text · server errors: HTTP 500
Availability: actual supplier pool, shared cache up to 20 s; not a reservation
No automatic retries after a transport error or ALLOCATION_UNCERTAIN.
Keep the original Idempotency-Key and parameters.
Unsupported: rent · calls · forwarding · multiple services per number · prolong
Unsupported options return BAD_REQUEST; unsupported actions return BAD_ACTION.
SMScash keys and country/service codes; configure this base URL in your software.Numè se valè pou 20 minit. SMS se tcheke chak 20 sekond. Ou ka anonse sou detann.
Authenticasyon ak retrasyon
REST: se yon Authorization: Bearer YOUR_API_KEY. Konpèti nan konplèti: paramèt api_key ak actionPou itilize HTTPS.
Pou administre API klike, enter kont ou.
API se frekuans ou yo apwopriye ak numè telefòn yo se non-limite. pa gen kout yo chak jou oswa chak jou.
Numè se valè pou 20 minit. SMS se tcheke chak 20 sekond. Ou ka anonse sou detann.
Nan lòt moun, yon sèl Idempotency-Key se bezwen pou alantasyon nan numè, repouse alantasyon, retry ak bay demand. Li se opsyonèl men te recomande nan handler_api.php. Re-anplase kouvè lè retrying yon rezo a rezo; sèvi ak yon nouvo kouvè pou yon nouvo operasyon.
Kouche nan API
Pou ou ka limite yon klike nan sèvis spesifik, peyi ak founisè. List yo vide pèmèt tout opsyon disponib.
{
"label": "nan pwogram",
"policy": {
"services": [
"go"
],
"countries": [
86
],
"providers": [
1
]
}
}PATCH /api/v1/keys/{id} chanje non ak politik la nèt. Sekrè a montre sèlman lè yo kreye.
10% nan total. 5% + 5% ak kod lojisyèl.
Si ou emite yon numè, ou vle bay ref pwòp la nan lojisyèl. Lojisyèl la se autorize pa yon kouvè nan eksekuti. Kòd la se nan seksyon "Referrals" ak nan GET /api/v1/referrals → software_ref.
| Pou ou | Kòmite | lojisyèl |
|---|---|---|
| pa ref | 10% | — |
| ak ref | 5% | 5% |
| pa ref, pa referè | — | 5% |
Plato bay bonis pa diminye lajan yo nan itilizatè. Soti nan lojisyèl ak referèman ka yo dwe menm moun. Yon itilizatè pa ka itilize kod yo.
Termi yo se fije lè yon sesyon se kreye; li yo pa modifye SMS ak retry. Pass ref re pou yon nouvo sesyon repo. Nan kalkulasyon tarife, yon travay remi nan USD 0.003 bay USD 0.00015 chak nan lojisyèl la ak referè. Bonis total se USD 0.00030.
API Komanda
11 XVBC-stile mèt yo plus balans SMScash ou.
GETgetNumberKòm yon numè+
Kreye yon sesyon ak reserve yon numè disponib pou itilizatè. Rate nan pri ak repozisyon repozisyon yo se fije nan alantasyon; pri se kredite lè yon SMS ak yon kòd an rive.
Paramèt
| Paramèt | Yon ti | Deskripsyon |
|---|---|---|
api_key* | string | Kle API pèsonèl itilizatè a. |
service* | string | Kòd sèvis disponib. Repon yo se limite nan zòn nan API kouvè. |
country* | integer | Pran ID de getCountries. |
operator | string | Pran ID de operators/getOperators (API). operator=1 · any/0 |
session_duration | integer | Sezyèm la gen 20 minit. Pass 20 oswa omite paramèt sa a. |
with_operator | integer | 1 ajoute ID operatè a nan repons lan; 0 oswa si li pa bay retounen twa pati. |
ref | string | Kòd piblik nan lojisyèl la nan yon moun: 5% pou li ak 5% pou yon moun. pa ref - 10% pou yon moun. |
* Paramèt bezwen. Nan tout demand yo tou pase ak akasyon =getNumber.
Eksè pou
curl 'https://smscash.org/stubs/handler_api.php?action=getNumber&api_key=YOUR_API_KEY&service=go&country=86&with_operator=1' \
-H 'Idempotency-Key: request-unique-001'package main
import (
"fmt"
"io"
"net/http"
"time"
)
func main() {
req, err := http.NewRequest("GET", "https://smscash.org/stubs/handler_api.php?action=getNumber&api_key=YOUR_API_KEY&service=go&country=86&with_operator=1", nil)
if err != nil { panic(err) }
req.Header.Set("Idempotency-Key", "request-unique-001")
client := &http.Client{Timeout: 15 * time.Second}
resp, err := client.Do(req)
if err != nil { panic(err) }
defer resp.Body.Close()
body, err := io.ReadAll(resp.Body)
if err != nil { panic(err) }
fmt.Println(resp.StatusCode, string(body))
}const response = await fetch("https://smscash.org/stubs/handler_api.php?action=getNumber&api_key=YOUR_API_KEY&service=go&country=86&with_operator=1", {
headers: {"Idempotency-Key": "request-unique-001"}
});
const result = await response.text();
console.log(response.status, result);import requests
response = requests.get(
"https://smscash.org/stubs/handler_api.php?action=getNumber&api_key=YOUR_API_KEY&service=go&country=86&with_operator=1",
headers={"Idempotency-Key": "request-unique-001"},
timeout=15,
)
print(response.status_code, response.text)Règleman
ACCESS_NUMBER:42:380670000000:1EMPTY_POOL- Chwa otomatik: plis kòd nan dènye èdtan an, apre sa nan 24 èdtan. Pa gen nimewo: pwochen operatè.
- Pase Idempotency-Key: menm demann sa a ak menm ke la retounen sesyon anvan an. chanje paramèt yo IDEMPOTENCY_CONFLICT.
- Yon peyi numèrik pa yon pous bay EMPTY_POOL; fòma peyi yo se BAD_COUNTRY.
- Yon sezyon an te itilize: replaying alantasyon ak ke ke re-vèt SESSION_CLOSED ak pa rele yon lòt numè.
- Rezilta nan alantasyon se pa konfirmasyon. Retri otomatik se deaktivite yo evite alantasyon yon numè an nan.
GETgetNumbersStatusKontrole nan disponibite+
Telefòn nan disponib nan sèvis ak peyi.
Paramèt
| Paramèt | Yon ti | Deskripsyon |
|---|---|---|
api_key* | string | Kle API pèsonèl itilizatè a. |
country* | integer | Pran ID de getCountries. |
* Paramèt bezwen. Nan tout demand yo tou pase ak akasyon =getNumbersStatus.
Eksè pou
curl 'https://smscash.org/stubs/handler_api.php?action=getNumbersStatus&api_key=YOUR_API_KEY&country=86'package main
import (
"fmt"
"io"
"net/http"
"time"
)
func main() {
req, err := http.NewRequest("GET", "https://smscash.org/stubs/handler_api.php?action=getNumbersStatus&api_key=YOUR_API_KEY&country=86", nil)
if err != nil { panic(err) }
client := &http.Client{Timeout: 15 * time.Second}
resp, err := client.Do(req)
if err != nil { panic(err) }
defer resp.Body.Close()
body, err := io.ReadAll(resp.Body)
if err != nil { panic(err) }
fmt.Println(resp.StatusCode, string(body))
}const response = await fetch("https://smscash.org/stubs/handler_api.php?action=getNumbersStatus&api_key=YOUR_API_KEY&country=86");
const result = await response.json();
console.log(response.status, result);import requests
response = requests.get(
"https://smscash.org/stubs/handler_api.php?action=getNumbersStatus&api_key=YOUR_API_KEY&country=86",
timeout=15,
)
print(response.status_code, response.json())Règleman
{
"go_0": 0
}- _0 suffix se yon opsyon pa yon operatè spesifik.
- Disponibilite refere nan pous total nan founisè. Kanèl ki chwazi se tcheke lè yon numè yo se alike.
GETgetStatusKòm yo nan dènye+
Yon fasil demand pou kondisyon sesyon ak son SMS kod. Zero yo nan kod an yo konserve.
Paramèt
| Paramèt | Yon ti | Deskripsyon |
|---|---|---|
api_key* | string | Kle API pèsonèl itilizatè a. |
id* | integer | ID nan sesyon ou, te resevwa lè numè li te emite. |
* Paramèt bezwen. Nan tout demand yo tou pase ak akasyon =getStatus.
Eksè pou
curl 'https://smscash.org/stubs/handler_api.php?action=getStatus&api_key=YOUR_API_KEY&id=42'package main
import (
"fmt"
"io"
"net/http"
"time"
)
func main() {
req, err := http.NewRequest("GET", "https://smscash.org/stubs/handler_api.php?action=getStatus&api_key=YOUR_API_KEY&id=42", nil)
if err != nil { panic(err) }
client := &http.Client{Timeout: 15 * time.Second}
resp, err := client.Do(req)
if err != nil { panic(err) }
defer resp.Body.Close()
body, err := io.ReadAll(resp.Body)
if err != nil { panic(err) }
fmt.Println(resp.StatusCode, string(body))
}const response = await fetch("https://smscash.org/stubs/handler_api.php?action=getStatus&api_key=YOUR_API_KEY&id=42");
const result = await response.text();
console.log(response.status, result);import requests
response = requests.get(
"https://smscash.org/stubs/handler_api.php?action=getStatus&api_key=YOUR_API_KEY&id=42",
timeout=15,
)
print(response.status_code, response.text)Règleman
STATUS_WAIT_CODESTATUS_OK:001234STATUS_CANCELNO_ACTIVATION- Pwodui chak 20 segond. Li yon mesaj ankò pa kreye yon lòt peye.
- Apre retry ansyen kod la pa retounen: getStatus tann pou dènye a SMS.
- Apre yon numè pa SMS te te ale, getStatus ak getSms Retire STATUS_CANCEL; getSmsFull Retire yon kondisyon ki te tan, yon telefòn vide ak yon sms Lèt REST /activations/{id} ak /sms Retire 404 NO_ACTIVATION.
GETsetStatusSeyasyon Managè+
Konplete, anule oswa re-repli yo espere SMS. Sesyon an te fin li yo toujou menm.
Paramèt
| Paramèt | Yon ti | Deskripsyon |
|---|---|---|
api_key* | string | Kle API pèsonèl itilizatè a. |
id* | integer | ID nan sesyon ou, te resevwa lè numè li te emite. |
status* | integer | 3 - espere pou kod la nan nouvo pa tcheke sesyon; 6 - fini po SMS; 8 - anvèsyon anvan. |
* Paramèt bezwen. Nan tout demand yo tou pase ak akasyon =setStatus.
Eksè pou
curl 'https://smscash.org/stubs/handler_api.php?action=setStatus&api_key=YOUR_API_KEY&id=42&status=3' \
-H 'Idempotency-Key: request-unique-001'package main
import (
"fmt"
"io"
"net/http"
"time"
)
func main() {
req, err := http.NewRequest("GET", "https://smscash.org/stubs/handler_api.php?action=setStatus&api_key=YOUR_API_KEY&id=42&status=3", nil)
if err != nil { panic(err) }
req.Header.Set("Idempotency-Key", "request-unique-001")
client := &http.Client{Timeout: 15 * time.Second}
resp, err := client.Do(req)
if err != nil { panic(err) }
defer resp.Body.Close()
body, err := io.ReadAll(resp.Body)
if err != nil { panic(err) }
fmt.Println(resp.StatusCode, string(body))
}const response = await fetch("https://smscash.org/stubs/handler_api.php?action=setStatus&api_key=YOUR_API_KEY&id=42&status=3", {
headers: {"Idempotency-Key": "request-unique-001"}
});
const result = await response.text();
console.log(response.status, result);import requests
response = requests.get(
"https://smscash.org/stubs/handler_api.php?action=setStatus&api_key=YOUR_API_KEY&id=42&status=3",
headers={"Idempotency-Key": "request-unique-001"},
timeout=15,
)
print(response.status_code, response.text)Règleman
ACCESS_RETRY_GETACCESS_ACTIVATIONACCESS_CANCEL- Retry w ap w apwopriye pou kod la nan 20 minit nan kounye a. Lojisyèl ak tan yo te fin pa modifye.
- Pou yon statè =3 Pou itilize Idempotency-Key: repoze la pa pral repoze nouvo kòd ki deja resevwa. SMS Li toujou disponib.
- Ankalasyon pa retire bon jan yo te resevwa.
- Pou numè ki gen yon kod SMS yo te mete nan istorik. Numè anann ak te fin pa yon kod se te retire.
GETgetRepeatNumberYon fwa tou de numè+
Ou ou yon nouvo sezyon ak yon numè spesifik nan istorik ou. Ou ka chwazi yon lòt sèvis disponib nan menm peyi.
Paramèt
| Paramèt | Yon ti | Deskripsyon |
|---|---|---|
api_key* | string | Kle API pèsonèl itilizatè a. |
number* | string | Yon sèl nan numè ou an. Pou numè ak yon optional + ki te autorize. |
service* | string | Kòd sèvis disponib. Repon yo se limite nan zòn nan API kouvè. |
session_duration | integer | Sezyèm la gen 20 minit. Pass 20 oswa omite paramèt sa a. |
with_operator | integer | 1 ajoute ID operatè a nan repons lan; 0 oswa si li pa bay retounen twa pati. |
ref | string | Kòd piblik nan lojisyèl la nan yon moun: 5% pou li ak 5% pou yon moun. pa ref - 10% pou yon moun. |
operator | string | Pran ID de operators/getOperators (API). operator=1 · any/0 |
* Paramèt bezwen. Nan tout demand yo tou pase ak akasyon =getRepeatNumber.
Eksè pou
curl 'https://smscash.org/stubs/handler_api.php?action=getRepeatNumber&api_key=YOUR_API_KEY&number=380670000000&service=go' \
-H 'Idempotency-Key: request-unique-001'package main
import (
"fmt"
"io"
"net/http"
"time"
)
func main() {
req, err := http.NewRequest("GET", "https://smscash.org/stubs/handler_api.php?action=getRepeatNumber&api_key=YOUR_API_KEY&number=380670000000&service=go", nil)
if err != nil { panic(err) }
req.Header.Set("Idempotency-Key", "request-unique-001")
client := &http.Client{Timeout: 15 * time.Second}
resp, err := client.Do(req)
if err != nil { panic(err) }
defer resp.Body.Close()
body, err := io.ReadAll(resp.Body)
if err != nil { panic(err) }
fmt.Println(resp.StatusCode, string(body))
}const response = await fetch("https://smscash.org/stubs/handler_api.php?action=getRepeatNumber&api_key=YOUR_API_KEY&number=380670000000&service=go", {
headers: {"Idempotency-Key": "request-unique-001"}
});
const result = await response.text();
console.log(response.status, result);import requests
response = requests.get(
"https://smscash.org/stubs/handler_api.php?action=getRepeatNumber&api_key=YOUR_API_KEY&number=380670000000&service=go",
headers={"Idempotency-Key": "request-unique-001"},
timeout=15,
)
print(response.status_code, response.text)Règleman
ACCESS_NUMBER:43:380670000000NUMBER_IN_USE- Tout premye, fin oswa anule sesyon ou anvan. Si numè se zòn, re-exuanse pa te fè.
- Yon nouvo sezyon an ap resevwa yon nouvo ID ak tarife an. SMS an an nan yo pa kopi. ref se mete nan nou.
- SMScash ka fè pou repoze sèlman nan numè nan istorik nan kont sa a. peyi a se identifye pa numè.
- Yon sezyon an te itilize: replaying alantasyon ak ke ke re-vèt SESSION_CLOSED ak pa rele yon lòt numè.
GETgetSmsFullKòm SMS kòm JSON+
Yon istorik konstriksyon nan tout mesaj ak ID, sendè, kod, tèks ak peyi, sèvis ak founisè enfòmasyon.
Paramèt
| Paramèt | Yon ti | Deskripsyon |
|---|---|---|
api_key* | string | Kle API pèsonèl itilizatè a. |
id* | integer | ID nan sesyon ou, te resevwa lè numè li te emite. |
* Paramèt bezwen. Nan tout demand yo tou pase ak akasyon =getSmsFull.
Eksè pou
curl 'https://smscash.org/stubs/handler_api.php?action=getSmsFull&api_key=YOUR_API_KEY&id=42'package main
import (
"fmt"
"io"
"net/http"
"time"
)
func main() {
req, err := http.NewRequest("GET", "https://smscash.org/stubs/handler_api.php?action=getSmsFull&api_key=YOUR_API_KEY&id=42", nil)
if err != nil { panic(err) }
client := &http.Client{Timeout: 15 * time.Second}
resp, err := client.Do(req)
if err != nil { panic(err) }
defer resp.Body.Close()
body, err := io.ReadAll(resp.Body)
if err != nil { panic(err) }
fmt.Println(resp.StatusCode, string(body))
}const response = await fetch("https://smscash.org/stubs/handler_api.php?action=getSmsFull&api_key=YOUR_API_KEY&id=42");
const result = await response.json();
console.log(response.status, result);import requests
response = requests.get(
"https://smscash.org/stubs/handler_api.php?action=getSmsFull&api_key=YOUR_API_KEY&id=42",
timeout=15,
)
print(response.status_code, response.json())Règleman
{
"success": true,
"session_id": 42,
"phone": "380670000000",
"status": 1,
"status_name": "received",
"sms_count": 1,
"sms": [
{
"id": 101,
"external_id": "message-101",
"sender": "Service",
"code": "001234",
"text": "Код подтверждения: 001234",
"received_at": "2026-10-09T12:00:00Z",
"country": {
"id": 86,
"name": "Italy"
},
"service": {
"code": "go",
"name": "Google"
},
"provider": {
"id": 1,
"name": "Оператор 1"
}
}
],
"expires_at": "2026-10-09T12:20:00Z"
}- Preferred format pou integrasyon. Remember sms[].id pou pwosesis sèlman nouvo mesaj yo.
- Numerik kondisyon SMScash: 1 - aktif, 6 - konplè, 8 - anule oswa te fin. status_name distingue entre ki te pran, te fin, anule, te fin.
- Kod resevwa rete disponib apre yon sesyon fèmen. Pou gwo volim, itilize REST /activations/{id}/sms ak after_id.
- Apre yon numè pa SMS te te ale, getStatus ak getSms Retire STATUS_CANCEL; getSmsFull Retire yon kondisyon ki te tan, yon telefòn vide ak yon sms Lèt REST /activations/{id} ak /sms Retire 404 NO_ACTIVATION.
GETgetSmsKite SMS kòm yon string nan tèks+
Retouran tout istorik SMS nan format string pou kliyan yo ki egziste.
Paramèt
| Paramèt | Yon ti | Deskripsyon |
|---|---|---|
api_key* | string | Kle API pèsonèl itilizatè a. |
id* | integer | ID nan sesyon ou, te resevwa lè numè li te emite. |
* Paramèt bezwen. Nan tout demand yo tou pase ak akasyon =getSms.
Eksè pou
curl 'https://smscash.org/stubs/handler_api.php?action=getSms&api_key=YOUR_API_KEY&id=42'package main
import (
"fmt"
"io"
"net/http"
"time"
)
func main() {
req, err := http.NewRequest("GET", "https://smscash.org/stubs/handler_api.php?action=getSms&api_key=YOUR_API_KEY&id=42", nil)
if err != nil { panic(err) }
client := &http.Client{Timeout: 15 * time.Second}
resp, err := client.Do(req)
if err != nil { panic(err) }
defer resp.Body.Close()
body, err := io.ReadAll(resp.Body)
if err != nil { panic(err) }
fmt.Println(resp.StatusCode, string(body))
}const response = await fetch("https://smscash.org/stubs/handler_api.php?action=getSms&api_key=YOUR_API_KEY&id=42");
const result = await response.text();
console.log(response.status, result);import requests
response = requests.get(
"https://smscash.org/stubs/handler_api.php?action=getSms&api_key=YOUR_API_KEY&id=42",
timeout=15,
)
print(response.status_code, response.text)Règleman
STATUS_OK:2026-10-09T12:00:00Z|001234|Код подтверждения: 001234STATUS_WAIT_CODESTATUS_CANCEL- Fòmat mesaj: time ±code×text. Plizyè mesaj separe pa yon kolon.
- SMS yo nan tèt yo ka gen kolòn ak bar vertikal. Pou parsing pou konfyans, sèvi ak getSmsFull.
GETgetServicesSèvis+
Kòd sèvis disponib. Repon yo se limite nan zòn nan API kouvè.
Paramèt
| Paramèt | Yon ti | Deskripsyon |
|---|---|---|
api_key* | string | Kle API pèsonèl itilizatè a. |
country | integer | Pran ID de getCountries. |
* Paramèt bezwen. Nan tout demand yo tou pase ak akasyon =getServices.
Eksè pou
curl 'https://smscash.org/stubs/handler_api.php?action=getServices&api_key=YOUR_API_KEY'package main
import (
"fmt"
"io"
"net/http"
"time"
)
func main() {
req, err := http.NewRequest("GET", "https://smscash.org/stubs/handler_api.php?action=getServices&api_key=YOUR_API_KEY", nil)
if err != nil { panic(err) }
client := &http.Client{Timeout: 15 * time.Second}
resp, err := client.Do(req)
if err != nil { panic(err) }
defer resp.Body.Close()
body, err := io.ReadAll(resp.Body)
if err != nil { panic(err) }
fmt.Println(resp.StatusCode, string(body))
}const response = await fetch("https://smscash.org/stubs/handler_api.php?action=getServices&api_key=YOUR_API_KEY");
const result = await response.json();
console.log(response.status, result);import requests
response = requests.get(
"https://smscash.org/stubs/handler_api.php?action=getServices&api_key=YOUR_API_KEY",
timeout=15,
)
print(response.status_code, response.json())Règleman
{
"go": {
"name": "Google",
"code": "go"
}
}- Direktiwè sèvis yo te divize nan tout founisè. Nombres disponib nan tcheke separatman.
GETgetCountriesPeyi+
ID, nom ak kod an chwa pou peyi nan kanèl ki chwazi.
Paramèt
| Paramèt | Yon ti | Deskripsyon |
|---|---|---|
api_key* | string | Kle API pèsonèl itilizatè a. |
* Paramèt bezwen. Nan tout demand yo tou pase ak akasyon =getCountries.
Eksè pou
curl 'https://smscash.org/stubs/handler_api.php?action=getCountries&api_key=YOUR_API_KEY'package main
import (
"fmt"
"io"
"net/http"
"time"
)
func main() {
req, err := http.NewRequest("GET", "https://smscash.org/stubs/handler_api.php?action=getCountries&api_key=YOUR_API_KEY", nil)
if err != nil { panic(err) }
client := &http.Client{Timeout: 15 * time.Second}
resp, err := client.Do(req)
if err != nil { panic(err) }
defer resp.Body.Close()
body, err := io.ReadAll(resp.Body)
if err != nil { panic(err) }
fmt.Println(resp.StatusCode, string(body))
}const response = await fetch("https://smscash.org/stubs/handler_api.php?action=getCountries&api_key=YOUR_API_KEY");
const result = await response.json();
console.log(response.status, result);import requests
response = requests.get(
"https://smscash.org/stubs/handler_api.php?action=getCountries&api_key=YOUR_API_KEY",
timeout=15,
)
print(response.status_code, response.json())Règleman
{
"86": {
"id": 86,
"name": "Italy",
"phone_code": "39"
}
}GETgetOperatorsoperatè+
Operatè ki disponib: ID API, non ak peryòd pou kenbe rekonpans lan.
Paramèt
| Paramèt | Yon ti | Deskripsyon |
|---|---|---|
api_key* | string | Kle API pèsonèl itilizatè a. |
country | integer | Pran ID de getCountries. |
operator | string | Pran ID de operators/getOperators (API). operator=1 · any/0 |
* Paramèt bezwen. Nan tout demand yo tou pase ak akasyon =getOperators.
Eksè pou
curl 'https://smscash.org/stubs/handler_api.php?action=getOperators&api_key=YOUR_API_KEY'package main
import (
"fmt"
"io"
"net/http"
"time"
)
func main() {
req, err := http.NewRequest("GET", "https://smscash.org/stubs/handler_api.php?action=getOperators&api_key=YOUR_API_KEY", nil)
if err != nil { panic(err) }
client := &http.Client{Timeout: 15 * time.Second}
resp, err := client.Do(req)
if err != nil { panic(err) }
defer resp.Body.Close()
body, err := io.ReadAll(resp.Body)
if err != nil { panic(err) }
fmt.Println(resp.StatusCode, string(body))
}const response = await fetch("https://smscash.org/stubs/handler_api.php?action=getOperators&api_key=YOUR_API_KEY");
const result = await response.json();
console.log(response.status, result);import requests
response = requests.get(
"https://smscash.org/stubs/handler_api.php?action=getOperators&api_key=YOUR_API_KEY",
timeout=15,
)
print(response.status_code, response.json())Règleman
{
"1": {
"id": 1,
"provider_id": 1,
"operator": 1,
"name": "Оператор 1",
"earnings_hold_days": 45
}
}- Pran ID de operators/getOperators (API).
GETgetRewardsPwodwi pou SMS+
Tarif depann nan peyi a. Tout lajan tab yo se per SMS bay.
Paramèt
| Paramèt | Yon ti | Deskripsyon |
|---|---|---|
api_key* | string | Kle API pèsonèl itilizatè a. |
country | integer | Pran ID de getCountries. |
service | string | Kòd sèvis disponib. Repon yo se limite nan zòn nan API kouvè. |
operator | string | Pran ID de operators/getOperators (API). operator=1 · any/0 |
* Paramèt bezwen. Nan tout demand yo tou pase ak akasyon =getRewards.
Eksè pou
curl 'https://smscash.org/stubs/handler_api.php?action=getRewards&api_key=YOUR_API_KEY&country=59&service=vi'package main
import (
"fmt"
"io"
"net/http"
"time"
)
func main() {
req, err := http.NewRequest("GET", "https://smscash.org/stubs/handler_api.php?action=getRewards&api_key=YOUR_API_KEY&country=59&service=vi", nil)
if err != nil { panic(err) }
client := &http.Client{Timeout: 15 * time.Second}
resp, err := client.Do(req)
if err != nil { panic(err) }
defer resp.Body.Close()
body, err := io.ReadAll(resp.Body)
if err != nil { panic(err) }
fmt.Println(resp.StatusCode, string(body))
}const response = await fetch("https://smscash.org/stubs/handler_api.php?action=getRewards&api_key=YOUR_API_KEY&country=59&service=vi");
const result = await response.json();
console.log(response.status, result);import requests
response = requests.get(
"https://smscash.org/stubs/handler_api.php?action=getRewards&api_key=YOUR_API_KEY&country=59&service=vi",
timeout=15,
)
print(response.status_code, response.json())Règleman
{
"59": {
"vi": {
"1": "0.01000000",
"3": "0.00500000"
}
}
}{}- USD lajan tarif yo se retire kòm yon ti decimal eksakte ak 8 ti decimal:
- Pou founisè ki disponib nan klè ou.
- country ID → service code → operator ID → reward (USD)
GETgetBalanceBalans itilizatè a+
Additional SMScash: balans disponib ki gen ladan akre, bonis referral ak demand bay.
Paramèt
| Paramèt | Yon ti | Deskripsyon |
|---|---|---|
api_key* | string | Kle API pèsonèl itilizatè a. |
* Paramèt bezwen. Nan tout demand yo tou pase ak akasyon =getBalance.
Eksè pou
curl 'https://smscash.org/stubs/handler_api.php?action=getBalance&api_key=YOUR_API_KEY'package main
import (
"fmt"
"io"
"net/http"
"time"
)
func main() {
req, err := http.NewRequest("GET", "https://smscash.org/stubs/handler_api.php?action=getBalance&api_key=YOUR_API_KEY", nil)
if err != nil { panic(err) }
client := &http.Client{Timeout: 15 * time.Second}
resp, err := client.Do(req)
if err != nil { panic(err) }
defer resp.Body.Close()
body, err := io.ReadAll(resp.Body)
if err != nil { panic(err) }
fmt.Println(resp.StatusCode, string(body))
}const response = await fetch("https://smscash.org/stubs/handler_api.php?action=getBalance&api_key=YOUR_API_KEY");
const result = await response.text();
console.log(response.status, result);import requests
response = requests.get(
"https://smscash.org/stubs/handler_api.php?action=getBalance&api_key=YOUR_API_KEY",
timeout=15,
)
print(response.status_code, response.text)Règleman
ACCESS_BALANCE:0.00- getBalance retire balans USD ki disponib ak plis pase 8 desimal.
- Ou ka retire sèlman lajan ki fin pase peryòd atant li.
GETgetHoldBalanceLajan bloke+
Apre ou resevwa yon SMS, revni an bloke pandan peryòd founisè a fikse a. Nan dat ki fikse a, montan an vin disponib otomatikman pou w retire li.
Paramèt
| Paramèt | Yon ti | Deskripsyon |
|---|---|---|
api_key* | string | Kle API pèsonèl itilizatè a. |
* Paramèt bezwen. Nan tout demand yo tou pase ak akasyon =getHoldBalance.
Eksè pou
curl 'https://smscash.org/stubs/handler_api.php?action=getHoldBalance&api_key=YOUR_API_KEY'package main
import (
"fmt"
"io"
"net/http"
"time"
)
func main() {
req, err := http.NewRequest("GET", "https://smscash.org/stubs/handler_api.php?action=getHoldBalance&api_key=YOUR_API_KEY", nil)
if err != nil { panic(err) }
client := &http.Client{Timeout: 15 * time.Second}
resp, err := client.Do(req)
if err != nil { panic(err) }
defer resp.Body.Close()
body, err := io.ReadAll(resp.Body)
if err != nil { panic(err) }
fmt.Println(resp.StatusCode, string(body))
}const response = await fetch("https://smscash.org/stubs/handler_api.php?action=getHoldBalance&api_key=YOUR_API_KEY");
const result = await response.text();
console.log(response.status, result);import requests
response = requests.get(
"https://smscash.org/stubs/handler_api.php?action=getHoldBalance&api_key=YOUR_API_KEY",
timeout=15,
)
print(response.status_code, response.text)Règleman
ACCESS_HOLD_BALANCE:34.50000001- SMScash · getHoldBalance · USD · 8
- Ou ka retire sèlman lajan ki fin pase peryòd atant li.
Kòd nan respons ak repoze pou repoze
Antre handler_apiRezilta biznis .php an jeneral vin ak HTTP 200. Gade tèks kò a. Dirèk ak getSmsFull retounen JSON si l reyisi, erè yo toujou se tèks.
| Kòd | HTTP | Yon bagay ak yon etap anvan |
|---|---|---|
TARIFF_NOT_CONFIGURED | 200 | pa mete nan tanNumè alantasyon yo pral kòmanse lè SMS bonis yo konfigure. |
COUNTRY_BLOCKED | 200 | Numè alantasyon pou peyi a se bloke.Kòm chwazi yon lòt peyi. |
BAD_SERVICE | 200 | Numè alantasyon pou sèvis sa a se bloke.Kòm yon lòt sèvis. |
PROVIDER_NOT_READY | 200 | Nòm nan alantasyon se temporarman pa disponibRèj nan katalo a API. |
BAD_KEY | 400 | Non api_key ou fòma ki pa valid.Klike sou li nan li. |
INVALID_API_KEY | 401 | Kouche se desconekte, revoke oswa kont se deaktiv.Kòmande yon API klè valide. |
BAD_COUNTRY | 400 | Yon peyi se pa yon yon yon sipleman ou pa yon sipleman pozitif.Pran ID de getCountries. |
BAD_SESSION_DURATION | 400 | Telefòn yo te rele pou eksakt 20 minit.Korije session_duration. |
BAD_REQUEST | 400 | Invalid paramè oswa Idempotency-Key.Vwayaj ou koreksyon ou. |
BAD_SERVICE / BAD_OPERATOR / INVALID_PROVIDER | 200 | Nenpòt oswa defòti nan yon entèti nan direktori.Rèj nan katalo a API. |
BAD_NUMBER | 200 | Formasyon nan yon numè incorrect.Kòmèt nan numè nan digit. |
BAD_ACTION / BAD_STATUS | 200 | Yon òdinatè, ID oswa operasyon.Konvèti nan sèten. |
EMPTY_POOL | 200 | pa gen yon telefòn ki pa konpare nan tan an.Repeatman nan 10-30 sekondè oswa modifye filtre. |
NUMBER_IN_USE | 200 | Yon yon sèl nan yon sèl se okupe pa yon sezyon ak aktif.Konplete sesyon ou oswa chwazi yon lòt numè. |
NO_ACTIVATION | 200 | Sezyèm oswa numè anvan pa gen nan kont ou.Klike ID ak Klike. |
SESSION_CLOSED / SMS_REQUIRED | 200 | Yon transisyon nan peyi a pa disponib nan tan an.Konvèti kondisyon ak disponib nan SMS. |
SCOPE_BLOCKED | 200 | sèvis, peyi, oswa founisè pa gen autorizasyon pou klè.Updatè nan pwogram nan API. |
IDEMPOTENCY_CONFLICT | 200 | Li se ke ou se deja ki asye ak lòt paramèt.Pou yon nouvo operasyon, kreye yon lòt Idempotency-Key. |
BAD_REF / SELF_REF | 400 | Kòd la lojisyèl se desconekte, defekte, oswa gen nan itilizatè nan tèt li.Kòm nan pwogram la nan lojisyèl. |
INTERNAL_ERROR | 500 | Yon sèvè temporary oswa yon defwa nan founisè.Repete ak yon ti tan ak menm bagay la Idempotency-Key. |
ALLOCATION_PENDING | 200 | Alokasyon kantite deja anvan. Restabli ak menm bagay la Idempotency-Key.Alokasyon kantite deja anvan. Restabli ak menm bagay la Idempotency-Key. |
ALLOCATION_UNCERTAIN | 200 | Rezilta nan alantasyon se pa konfirmasyon. Retri otomatik se deaktivite yo evite alantasyon yon numè an nan.Rezilta nan alantasyon se pa konfirmasyon. Retri otomatik se deaktivite yo evite alantasyon yon numè an nan. |
REST Retire yon objek {"error":{"code":"…","message":"…"}} ak konvèsyon konvèsyon HTTP 400/401/403/404/409/503.
{
"error": {
"code": "BAD_REQUEST",
"message": "Klike nan kay la nan demand.",
"request_id": "req_…",
"hint": "Use the documented JSON type; numbers must not be quoted.",
"retryable": false,
"details": {
"field": "country",
"expected": "integer"
}
}
}X-Request-ID: included in every API response
405: Allow lists the supported HTTP methods
ALLOCATION_PENDING: retryable=true · Retry-After=3 · same operation key
ALLOCATION_UNCERTAIN: retryable=false · contact support
Transport errors: check the operation before another write; keep the original key.REST pou nouvo integrasyon
USD lajan tarif yo se retire kòm yon ti decimal eksakte ak 8 ti decimal: 0.00300000 USD.
Valè balans se USD. Kòmans la pou ou ak reponn yo disponib nan OpenAPI.
/api/v1/catalogSèvis ak peyi/api/v1/tariffsSMS nan bonè nan peyi a/api/v1/offersRate ak bon jan kalite/api/v1/servicesDirekè/api/v1/countriesDirekè/api/v1/operatorsDirekè/api/v1/availability?country=1Nòm nan disponib/api/v1/activationsYon nouvo sesyon/api/v1/activations/batch?ids=42,43Verifye plizyè nimewo/api/v1/activations200 sesyon nan dènye: scope = istwa, espere oswa tout/api/v1/activations/{id}Sesyon ak mesaj/api/v1/activations/{id}/sms?after_id=0&limit=100Yon SMS nou ak yon Cursor/api/v1/activations/{id}/retryPou yon SMS/api/v1/activations/{id}/finishKonplè/api/v1/activations/{id}/cancelKòmann/api/v1/activations/repeatNUMER rechèch/api/v1/keysAPI Koupe/api/v1/keysKòmite yon Kouvè/api/v1/keys/{id}Change nan nom oswa politik/api/v1/keys/{id}Kouche a/api/v1/referralsKòd referans ak profit/api/v1/summarybalans ak resonans/api/v1/balanceLajan bloke/api/v1/ledgerMoun k ap devlope yo/api/v1/withdrawalsPwodwi pou Pwodwi/api/v1/withdrawalsKreye yon solisyon/api/v1/statisticsToutman statistike/api/v1/earnings/holdsPeryòd atant pou revniPou yo pran sèlman SMS nouvo
GET /api/v1/activations/42/sms?after_id=0&limit=100
Authorization: Bearer YOUR_API_KEY{
"session_id": 42,
"sms": [
{
"id": 101,
"code": "001234",
"text": "Kòd: 001234",
"sender": "Service",
"received_at": "2026-10-09T12:00:00Z"
}
],
"next_cursor": 101,
"has_more": false
}Pou pou next_cursor ak fè li nan kòm after_idSi has_more=true, la nan la nan a se ka wè sou yon fwa. limit: 1–200sezyon ak SMS se sèlman disponib nan yon ti ou.