API v2.0
API ist ein Protokoll für die Interaktion zwischen deiner Software und unserem Aktivierungsserver. Die API wird benötigt, um den Prozess des SMS-Empfangs auf deiner Seite zu automatisieren. Um mit der API arbeiten zu können, musst du deinen API-Schlüssel verwenden, den du auf der Profilseite erhältst. Unsere Software ist vollständig kompatibel mit den Websites der Wettbewerber.
API-Protokoll Beschreibung
Alle Anfragen sollten an https://api.sms-man.com/control/ gehen. POST- oder GET-Anfrage. Alle Anfragen müssen mit einem API-Schlüssel in Form des token Parameter enthalten
Kontostand anfordern
Parameter
Feld | Typ | Erforderlich | Wert |
|---|---|---|---|
token | String | yes | Dein API-Schlüssel |
Ergebnis
{
"balance": "799.70"
}Mögliche Fehler
{
"success": false,
"error_code": "wrong_token",
"error_msg": "Wrong token!"
}Limits erhalten
Parameter
Feld | Typ | Erforderlich | Wert |
|---|---|---|---|
token | String | yes | Dein API-Schlüssel |
country_id | Integer | no | |
application_id | Integer | no |
Ergebnis
[
{"application_id":"1","country_id":"1","numbers":"32302"},
{"application_id":"1","country_id":"2","numbers":"3494"}
]Mögliche Fehler
{
"success": false,
"error_code": "wrong_token",
"error_msg": {"token":"Wrong token!"}
}Eine Telefonnummer anfordern
Parameter
um ein zufälliges Land auszuwählen, verwenden Sie country_id=0
Feld | Typ | Erforderlich | Wert |
|---|---|---|---|
token | String | yes | Dein API-Schlüssel |
country_id | Integer | no | |
application_id | Integer | yes | |
maxPrice | Integer | no | Ihr gewünschter Wert |
currency | String | no | RUB/USD/EUR |
ref | String | no | Übergabe Empfehlungs-ID |
hasMultipleSms | String | no | True/False |
Ergebnis
{
"request_id": 1,
"country_id": 1,
"application_id": 1,
"number": "79002415539"
}Mögliche Fehler
{
"success": false,
"error_code": "wrong_token",
"error_msg": {"token":"Wrong token!"}
}Sms erhalten
Parameter
Feld | Typ | Erforderlich | Wert |
|---|---|---|---|
token | String | yes | Dein API-Schlüssel |
request_id | Integer | yes | Anfrage-ID |
Ergebnis
{
"request_id": 1,
"country_id": 1,
"application_id": 1,
"number": "79002415539",
"sms_code": "1243"
}Mögliche Fehler
{
"request_id": 1,
"country_id": 1,
"application_id": 1,
"number": "79002415539",
"error_code": "wait_sms",
"error_msg": "Still waiting..."
}Anfragestatus ändern
Parameter
Feld | Typ | Erforderlich | Wert |
|---|---|---|---|
token | String | yes | Dein API-Schlüssel |
request_id | Integer | yes | Anfrage-ID |
status | String | yes | ready / close / reject / used |
Ergebnis
{
"request_id": 1,
"success": true
}Mögliche Fehler
{
"success": false,
"error_code": "wrong_token",
"error_msg": "Wrong token!"
}
{
"success": false,
"error_code": "wrong_status",
"error_msg": "Status $status does not exists"
}Erhalten Sie aktuelle Preise
Parameter
Feld | Typ | Erforderlich | Wert |
|---|---|---|---|
token | String | yes | Dein API-Schlüssel |
country_id | Integer | no |
Ergebnis
{
"0": {"1":{"cost":"15","count":6455},"2":{"cost":"50","count":124}},
"1": {"3":{"cost":"6","count":1000}}
}Mögliche Fehler
{
"success": false,
"error_code": "wrong_token",
"error_msg": {"token":"Wrong token!"}
}Liste aller Länder anzeigen
Parameter
Feld | Typ | Erforderlich | Wert |
|---|---|---|---|
token | String | yes | Dein API-Schlüssel |
Ergebnis
[
{"id":0,"title":"Russia"},
{"id":3,"title":"China"}
]Mögliche Fehler
{
"success": false,
"error_code": "wrong_token",
"error_msg": "Wrong token!"
}Liste aller Services abrufen
Parameter
Feld | Typ | Erforderlich | Wert |
|---|---|---|---|
token | String | yes | Dein API-Schlüssel |
Ergebnis
[
{"id":"1","name":"Vkontakte","code":"vk"},
{"id":"2","name":"WeChat","code":"wb"},
{"id":"3","name":"Telegram","code":"tg"}
]Mögliche Fehler
{
"success": false,
"error_code": "wrong_token",
"error_msg": "Wrong token!"
}