Protokoolii API waliin SMS-Activate hojjechuuf
API protokoolii software keessanii fi server keenya gidduutti jiru dha
API adeemsa fudhannoo sms, otp, fi pva gama keessanitti automatize gochuuf barbaachisa
API keenya saayitota dorgommoota waliin guutummaan wal-simsiisa
Ergamni hundi gara https://api.sms-activate.ai/stubs/handler_api.php deemuu qaba
Ergama POST ykn GET.
Ergamni hundi api_key akka parametara GET ta’ee qabachuu qaba
Raawwii protokoolichaa PHP’n buufadhu Raawwii protokoolichaa Python’n qophaa’e buufadhuAPI Sochii
Qajeeltoota:
$api_key - Fulaa API
$country * - lakkoofsa biyyaa gabatee ilaali
$hojjetaa * lakkoofsoota hojjetaa mobaayilaa, lakkoofsa hedduu komaan addaan baasuun ibsuu dandeessa (kanneef qofa argama:
** kan argamuuf $country = 0, $country = 1, $country = 2
DEEBISAA:
Deebiin tajaajilichaa foormaatii JSON keessatti ta'a, fakkeenya:
{"vk_0":76,"ok_0":139,"wa_0":90,"vi_0":223,"tg_0":158,"wb_0":106,"go_0":182,"av_0":244,"av_1":211,"fb_0":107}
Yeroo daashichi maqaa tajaajilaa agarsiisu, booda mallattoo qajeelfama deebisuu barbaachisaa ta'uu agarsiisa. 0 - hin barbaachisu. 1 - barbaachisa.
Qajeeltoota:
$api_key - Fulaa API
$service * - Tajaajila gabatee ilaali
* qajeelfama filannoo. Yoo hin ibsamne, biyyoota olaanaa tajaajiloota hundaaf akkaataa jalqabaatiin ni agarsiifama.
$freePrice * - qajeelfama filannoo. Yoo kenname dhugaa, hammee fi gatiin akka Gati Jaalalaatiin ni kennama
DEEBISAA:
Deebiin tajaajilichaa foormaatii JSON keessatti ta'a, fakkeenya:
{
0: {
"country: 0,
"count": 43575,
"price": 15.00,
"retail_price": 30.00
}, ...
}
$freePrice = dhugaa:
{
0: {
"country: 0,
"count": 43575,
"price": 15.00,
"retail_price": 30.00,
"freePriceMap": {
"15.00": 43242,
"18.00": 333
}
}, ...
}
Gaaffii balance waliin account cashback:
* balance walitti qabame cashback ilaalchisee deebisa, yoo boxiin qindaa'ina account cashback 'Cashback fayyadamuuf activation irratti' tuqame ta'e
Qajeeltoota:
$api_key - Fulaa API
DEEBISAA:
ACCESS_BALANCE: 'balance account'
DOGOGGORNI DANDA'AMU:
BAD_KEY - API key sirrii hin taane
ERROR_SQL - dogongora sql-server
* hojjettoota hunda biyya dabarfameef argaman deebisa, yoo biyyichi hin dabarfamne - hojjettoota hunda biyya tokko tokkoof argaman deebisa
Qajeeltoota:
$api_key - Fulaa API
$country - koodii biyyaa
DEEBISAA:
Deebiin tajaajilichaa foormaatii JSON keessatti ta'a:
{"status":"success", "countryOperators": {
"Country1Code": ["operator1Name","operator2Name","operator3Name", ...],
"Country2Code": ["operator1Name","operator2Name","operator3Name", ...],
...
}}
Fakkeenya:
{"status":"success", "countryOperators": {
"0": ["beeline","megafon","mts", ...],
"1": ["life","mts","kyivstar","utel" ...],
...
}}
* keessa 'countryOperators' - furtuun koodii biyyaa ta'a
DOGOGGORNI DANDA'AMU:
BAD_KEY - API key sirrii hin taane
ERROR_SQL - dogongora sql-server
OPERATORS_NOT_FOUND - galmeen hin argamne (fkn. biyya hin jirre dabarfame)
Qajeeltoota:
$api_key - Fulaa API
DEEBISAA:
Deebiin tajaajilichaa foormaatii JSON keessatti ta'a:
{"status":"success", "activeActivations": [
{
"activationId" : "635468021",
"serviceCode" : "vk",
"phoneNumber" : "79********1",
"activationCost" : "12.50",
"activationStatus" : "4",
"smsCode" : ["CODE"],
"smsText" : "[Your CODE registration code]",
"activationTime" : "2022-06-01 16:59:16",
"discount" : "0.00",
"repeated" : "0",
"countryCode" : "0",
"countryName" : "Russia",
"canGetAnotherSms" : "1",
}]
DOGOGGORNI DANDA'AMU:
BAD_KEY - API key sirrii hin taane
ERROR_SQL - dogongora sql-server
NO_ACTIVATIONS - galmeen hin argamne (activation hojjetaa hin jiru)
Qajeeltoota:
$api_key - Fulaa API
$service - tajaajila ajajaaf gabatee ilaali
$forward * - lakkoofsa forwardinguun gaafachuu barbaachisaa dha?
* qajeelfama filannoo, 0 fudhata (hin hojjetin, akkaataa jalqabaatiin kaa'ame), 1 (hojjechiisi)
$maxPrice * - gatiin ol-aanaa lakkoofsa bitachuuf Gati Jaalalaatiin qophii keessan
* qajeelfama filannoo, yoo hin ibsamne, bitichiin gatiin idileettiin ni raawwatama
$phoneException * - prefix lakkoofsa Raashiyaa al-taasisu. Komaa'in galchi. Foormaatii barreessuu: koodii biyyaa fi dijiitii 3 hanga 6 maskii (fkn. 7918, 7900111). Gatii jalqabaa gatii account keessatti ibsame dha.
$operator* hojjetuun mobaayilaa lakkoofsichaa ti, isin dandeessu kanneen hedduu komaatin ibsuuf (kanuma ** qofaaf jira)
$activationType - gosa sochii: 0 - SMS waliin (kan dursee dhufe), 1 - lakkoofsa waliin, 2 - sagalee waliin
$language - afaan hiikuu (sochii sagalee waliin ta’uuf barbaachisaadha) gabatee ilaali
$userId * - ID fayyadamtaa banuuf yeroo sochiin isaanii gadhee ta’e, garuu akkaawuntii gurgurtaaduree ofii hin miine.
* dirqama miti
** kan argamuuf $country = 0, $country = 1, $country = 2
$ref - ID wabii dabarsuu.
$country - lakkoofsa biyyaa gabatee ilaali
$useCashBack* - gatii dhugaa fudhata, yoo parametariin 'dhuga' ta'e, bitni lakkoofsaa cashback irraa ni baasama. Yeroo maallaqiin cashback xumurate booda, bitni hafe hundi balance irraa ni raawwatama. Yaadachuun BARBACHISAA dha kan hafe hundi jalqaba cashback fayyadamu, ergasii balance guddicha (yoo parametara 'sobaa' itti aansee darbanillee).
parametara dirqama miti, 'dhuga' fudhata
Yeroo lakkoofsa API biraan argattan, waliigaltee kana waliin walii galu seerota pirojektii seerota pirojektii
DOGOGGORNI DANDA'AMU:
GATII GUDDICHA DOGOGGORAA:$min- gatii guddichi kenname kan hayyamamee gadii dha
$min - gatii xiqqaan hayyamamu
GOCHA DOGOGGORAA - gocha dogoggoraa
TAJAJILA DOGOGGORAA - maqaa tajaajilaa dogoggoraa
BAD_KEY - API key sirrii hin taane
ERROR_SQL - dogongora sql-server
BANAME:'YYYY-m-d H-i-s' - yeroo akkaawuntichi itti cufame
LAKKOOFSA ALAAGUU DOGOGGORAA - prefiksota alaaguu dogoggoraa
BALANSIIN DABARSUU HIN JIRU - maallaqiin ga’aa bituu dabarsuu bilbilaa hin jiru
DAANGAA CHAANELII - akkaawuntichi cufame
LAKKOOFNI HIN JIRU - lakkoofsi hin jiru
Yoo lakkoofsa hojjetuu addaa kan biyya filatame keessa hin hojjenne ykn tajaajila filatame hin qabne barbaaddan, lakkoofsi hojjetuu jalqabaa waamicha kee waliin wal simatu ni deebi'a
mala kun mala sana fakkaata getNumber, parametota walfakkaatanii fi dabalataa armaan gadiitti ibsamani fudhata, garuu odeeffannoo sochii dabalataa ni deebisa
Qajeeltoota:
$orderId- id sochii sirna gurgurtaaduree irraa. Yeroo bitamu, daataan kun id sochii fi gurgurtaaduree sirna keenya keessatti wal madaalama. Kanaanis, idempotence (ajaja tokko lammaffaa hin raawwanne) gonkumaa argachuuf barbaanna.
DEEBISAA:
Yoo gaaffiin milkaa’u ta’e, deebiin akka foormaatii armaan gadiitti ta’a:
{
"activationId": 635468024,
"phoneNumber": "79584******",
"activationCost": "12.50",
"countryCode": "0",
"canGetAnotherSms": "1",
"activationTime": "2022-06-01 17:30:57",
"activationOperator": "mtt"
}
Yoo lakkoofsa hojjetuu addaa kan biyya filatame keessa hin hojjenne ykn tajaajila filatame hin qabne barbaaddan, lakkoofsi hojjetuu jalqabaa waamicha kee waliin wal simatu ni deebi'a
DOGOGGORNI DANDA'AMU:
ORDER_ALREADY_EXISTS- ajajni duraan uumameera
Yeroo SMS lakkoofsaatti ergamu yoo argattan, yoo qajeelcha Webhooks saayitii keessan keessatti sochoosan taate, odeeffannoo waa’ee SMS sanaa gara teessoowwan ibsitaniif gaaffii POST fayyadamuun ni ergina
DEEBISAA:
Foormaatii deebii akkana ta’a:
{
"activationId": 635468024,
"service": "go",
"text": "Your sms text",
"code": "Your sms code",
"country": 0,
"receivedAt": "2022-06-01 17:30:57",
}
Gaaffii erguu yeroo, deebii skiriptii keessanii haala HTTP 200 qabu eegganna. Yoo skiriptii keessan hin deebine, gaaffii sa’atii 2 keessatti ni ergina, garuu al 8 ol hin ta’u.
Qajeelcha kana bakka armaan gadiitti sochoosuu dandeessa qajeelcha piroofaayilii
Qajeeltoota:
$api_key - Fulaa API
$service - tajaajila ajajaaf gabatee ilaali
$forward * - lakkoofsa forwardinguun gaafachuu barbaachisaa dha?
* parametarii filannoo, arfiileen dabarsuu komaatin addaan baafaman, lakkoofsi arfii dabarsuu lakkoofsa tajaajiloota parametarii keessatti ergamaniif wal-simu qaba $service. Tajaajila 1 qofa dabarsuu waliin erguun hayyamama, fakkeenyaaf "0,1,0,0" - sirrii, "0,1,1,0" - dogoggora. 0 (hin hojjetu, default), 1 (hojjedhu) fudhata
$operator * - hojjettaa mobaayilii lakkoofsaa, lakkoofsa hedduu komaatin addaan baafaman ibsuu dandeessa (** qofaaf argama):
$ref - ID wabii dabarsuu.
$country - lakkoofsa biyyaa gabatee ilaali
Yeroo lakkoofsa API biraan argattan, waliigaltee kana waliin walii galu seerota pirojektii seerota pirojektii
DEEBISAA:
LAKKOOFNI HIN JIRU - lakkoofsi hin jiru
NO_BALANCE - balance dhumeera
{{'phone':phone,'activation':activation,'service':service},
{'phone':phone,'activation':activation,'service':service}}, achi (phone - id hojiilee, activation - Lakkoofsa Bilbilaa, service - Tajaajila)
DOGOGGORNI DANDA'AMU:
GOCHA DOGOGGORAA - gocha dogoggoraa
TAJAJILA DOGOGGORAA - maqaa tajaajilaa dogoggoraa
BAD_KEY - API key sirrii hin taane
ERROR_SQL - dogongora sql-server
BANAME:'YYYY-m-d H-i-s' - yeroo akkaawuntichi itti cufame
Qajeeltoota:
$api_key - Fulaa API
$id - ID Sochii
$forward * - lakkoofsa bilbilaa gara isaatti dabarsuu barbaaddan
* yoo parametarii getNumber forward=1 ergame qofa barbaachisa.
$status - haala sochii
1 - waa’ee argama lakkoofsaa beeksisi (SMS lakkoofsatti ergame)
3 - koodii biraa gaafadhu (kanneen bilisaa)
6 - sochii xumuri *
8 - lakkoofsi duraan itti fayyadamee jira jedhamee gabaasi fi sochii haqu
* yoo haalli 'koodiin argame' ture - milkaa’ina isaa mallatteessi fi xumura, yoo 'qophii' ture - haqa fi dogoggora mallatteessa, yoo haalli 'irra deebi’uu eegaa' ture - sochii gara SMS eegamaatti jijjiira
** Yoo lakkoofsi duraan dhufe ta’e, haala sochii mala mirkaneessuu bilbilan filatameef jijjiiruun hin danda’amu
Yaada salphaa tartiiba hojii API waliin:
Lakkoofsa method getNumber fayyadamuun argachuu, ergasii gochawwan hordofan ni danda’amu:
8 - sochii haqi (yoo lakkoofsi siif mijataa hin ta’in)
1 - SMS ergamuu ibsi (filannoo)
Sochii haala 1 qabuuf:
8 - sochii haqi
Akkuma koodii argatan booda:
3 - SMS biraa gaafadhu
6 - koodii SMS-mirkaneessi fi sochii xumuri
Sochii haala 3 qabuuf:
6 - koodii SMS-mirkaneessi fi sochii xumuri
DEEBISAA:
ACCESS_READY - qophiin lakkoofsa mirkanaa'eera
ACCESS_RETRY_GET - SMS haaraa eeggachaa jira
ACCESS_ACTIVATION - tajaajilli milkaa'inaan hojjeefameera
ACCESS_CANCEL - sochiin haqameera
DOGOGGORNI DANDA'AMU:
EARLY_CANCEL_DENIED - lakkoofsa daqiiqaa 2 keessatti haquun hin hayyamamu
ERROR_SQL - dogongora sql-server
NO_ACTIVATION - ID sochii hin jiru
TAJAJILA DOGOGGORAA - maqaa tajaajilaa dogoggoraa
BAD_STATUS - haala dogongoraa
BAD_KEY - API key sirrii hin taane
GOCHA DOGOGGORAA - gocha dogoggoraa
WRONG_ACTIVATION_ID - ID dogongoraa ykn ID lakkoofsa miti.
Qajeeltoota:
$api_key - Fulaa API
$id - ID Sochii
DEEBISAA:
STATUS_WAIT_CODE - SMS eeggachaa jira
STATUS_WAIT_RETRY: 'koodii darbe, kan wal hin simne' - koodii ibsuu eeggachaa jira
STATUS_WAIT_RESEND - SMS deebi'anii erguu eeggachaa jira *
* softiweeriin SMS irra deebi'ee erguu fi haala gara 6tti jijjiiruu qaba
HAALA_HAQAME - sochiin haqameera
HAALA_TOLE: 'koodii sochii' - koodiin argame
DOGOGGORNI DANDA'AMU:
NO_ACTIVATION - ID sochii hin jiru
ERROR_SQL - dogongora sql-server
BAD_KEY - API key sirrii hin taane
GOCHA DOGOGGORAA - gocha dogoggoraa
Qajeeltoota:
$api_key - Fulaa API
$id - ID Sochii
DEEBISAA:
Foormaatii deebii akkana ta’a:
{
"verificationType": 2,
"sms": {
"dateTime": "0000-00-00 00:00:00",
"code": "code",
"text": "sms text",
},
"call": {
"from": "phone",
"text": "voice text",
"dateTime": "0000-00-00 00:00:00",
"url": "voice file url",
"parsingCount": 1,
}
}
HAALA_HAQAME - sochiin haqameera
DOGOGGORNI DANDA'AMU:
NO_ACTIVATION - ID sochii hin jiru
ERROR_SQL - dogongora sql-server
BAD_KEY - API key sirrii hin taane
GOCHA DOGOGGORAA - gocha dogoggoraa
Qajeeltoota:
$api_key - Fulaa API
$jalqabaa - yeroo Unix Timestamp akkaataa ittiin barreeffame (dirqama miti) - guyyaa kamirraa kaasee sochiilee ilaaluu
$xumura - yeroo Unix Timestamp akkaataa ittiin barreeffame (dirqama miti) - guyyaa kamiitti sochiilee ilaaluu
$ofsetii - ofsetii elementii jalqabaa deebii keessatti deebi'e. Kan dursee jiru 0 dha
$daangaa - lakkoofsaa ol'aanaa galmeewwan deebi'an. Ol'aanaan 100 dha. Kan dursee jiru 50 dha.
DEEBISAA:
Foormaatii deebii akkana ta’a:
[{
"id": 635468024,
"date": "2022-11-12 15:58:39",
"phone": "79918529716",
"sms": "sms":"["Your sms code"]",
"cost": 100 //Если активация не завершена, то cost = 0,
"status": "4",
}]
DOGOGGORNI DANDA'AMU:
ERROR_SQL - dogongora sql-server
BAD_KEY - API key sirrii hin taane
GOCHA DOGOGGORAA - gocha dogoggoraa
Qajeeltoota:
$api_key - Fulaa API
$service - maqaa tajaajilaa
DEEBISAA:
Foormaatii deebii akkana ta’a:
[{
"country": 0,
"share": 50 - // (Purchases of the chosen service by country as a percentage of the total quantity of purchases at our service),
"rate": 50 - // (% of successful activations among the total number of activations by the country)
}]
DOGOGGORNI DANDA'AMU:
ERROR_SQL - dogongora sql-server
BAD_KEY - API key sirrii hin taane
TAJAAYILAA_DOGONGORAA - tajaajila dogongoraa
GOCHA DOGOGGORAA - gocha dogoggoraa
Qajeeltoota:
$api_key - Fulaa API
$id - ID Sochii
DEEBISAA:
Deebiin tajaajilichaa foormaatii JSON keessatti ta'a, fakkeenya:
{"status":"2","phone":false}
HAALOTA DANDA'AMAN:
2 - sochii haaraa
3 - milkaa'inaan xumurame
4 - haqame
5 - deebi'e
DOGOGGORNI DANDA'AMU:
BAD_KEY - API key sirrii hin taane
INVALID_ACTIVATION_ID - ID sochii sirrii miti
Qajeeltoota:
$api_key - Fulaa API
$serviceMaqaa gabaabaa tajaajilaa (Dirqala miti, akkaataa addaan tajaajila hundumaa fudhata) gabatee ilaali
$countryMaqaa koodii biyyaa (Dirqala miti, akkaataa addaan biyyoota hundumaa fudhata) gabatee ilaali
DEEBISAA:
JSON - wanta akkuma kanaan
{"Country":{"Service":{"cost":Gatii,"count":Lakkoofsa}}}
Qajeeltoota:
$api_key - Fulaa API
$serviceMaqaa gabaabaa tajaajilaa (Dirqala miti, akkaataa addaan tajaajila hundumaa fudhata) gabatee ilaali
DEEBISAA:
JSON - wanta akkuma kanaan
{"Service":{"Country":{"count":Hamma","price":"Gatii"}}}
Qajeeltoota:
$api_key - Fulaa API
DEEBISAA:
JSON - wanta akkuma kanaan {{'Страна':{'id':0,'rus':"Россия","eng:"Russia","chn":"俄罗斯","visible":1,"retry":1,"rent":1,"multiService":1}},
itti (
id : lakkoofsa biyyaa;
rus : maqaa biyyaa Afaan Rushiyaan;
eng : maqaa biyyaa Afaan Ingiliiziin;
chn : maqaa biyyaa Afaan Chaayinaan;
visible : 0 - biyyattiin marsariiticha irratti hin agarsiifamu, 1 - ni agarsiifama;
retry : 0 - SMS irra deebi'uu HIN danda'amu, 1 - ni danda'ama;
rent : 0 - biyyattiin hin kirayamne, 1 - kirayamte;
multiService : 0-biyyattiin tajaajila hedduuf HIN dandeessu, 1- ni dandeessi.)
Qajeeltoota:
$api_key- Fulaa API
$country *- Lakkoofsa Biyyaa. Yoo biyyaa dabarsite ta'e, tajaajiloota gatii biyya filatameef qaban ni deebisna
$lang *- afaan 'maqaa' kennuuf itti fayyadamnu. Gatiin danda'amuu: 'ru', 'en', 'es', 'cn'. Kan dursee kaa'ame 'en' dha
* qajeeltota dirqii hin taane
DEEBISAA:
JSON - wanta akkuma kanaan { "status": "success", "services": [ { "code": "aoo", "name": "Pegasus Airlines" } ] }
Erga SMS jalqabaa lakkoofsa qajeelameef argatte booda, tajaajilota biroo wal-qabatanii kanneen akka Yula, Yandex, Avito, fi kanneen biroo bitachuu dandeessa
Gatiin tajaajila dabaluuf 5p qofa
Qajeeltoota:
$api_key - Fulaa API
$service - maqaa gabaabaa tajaajilaa ilaaluu, gabatee ilaali gabatee ilaali
$id - ID Sochii Abbaa
DEEBISAA:
ADDITIONAL:$id:$phone - sochiin haaraan milkaa'inaan uumame. Asitti ID jechuun ID sochii dabalamaa, phone jechuun lakkoofsa bilbilaa
DOGOGGORNI DANDA'AMU:
WRONG_ADDITIONAL_SERVICE - Tajaajila dabalamaa sirrii miti (tajaajilota qajeelumsaaf qofa hayyamamani)
WRONG_ACTIVATION_ID - ID sochii abbaa sirrii miti
WRONG_SECURITY - yeroo ID sochii osoo hin qajeellifneetti, ykn sochii xumuramee/hojii irra hin jirre erguuf yaalerratti dogogorri mudate
REPEAT_ADDITIONAL_SERVICE - dogogorri yeroo tajaajila bite ammas bituuf yaalamutti mu’ata NO_BALANCE - Maallaqa gahaa hin qabdu
ERROR_SQL- dogogora daataa beezii, tajaajila maamilaa dubbisi
Yoo sochii milkaa’aa lakkoofsicha irratti raawwatte ta’e, deebistee gochuu dandeessa.
Gatiin sochii dabalamaa biyyaa fi tajaajilarratti hunda’uun murtaa’a. Gatiin addaa irraa argamuu danda’a.
Qajeeltoota:
$api_key - Fulaa API
$activationId - ID Sochii Abbaa
DEEBISAA:
ACCESS_NUMBER:$id:$phone - sochiin haaraan milkaa'inaan uumame. Asitti $id jechuun ID sochii dabalamaa, $phone jechuun lakkoofsa bilbilaa
DOGOGGORNI DANDA'AMU:
RENEW_ACTIVATION_NOT_AVAILABLE- lakkoofsi kun sochii dabalamaaf hin jiru
WRONG_ACTIVATION_ID - ID sochii abbaa sirrii miti
ERROR_SQL- dogogora daataa beezii, tajaajila maamilaa dubbisi
NEW_ACTIVATION_IMPOSSIBLE- sochii dabalamaa gochuun hin danda’amu
NO_BALANCE - maallaqa herreega keessaa hin jiru
Argamummaa lakkoofsa sochii dabalamaaf ni barbaadduu, gatii isaa argachuu dandeessa
Qajeeltoota:
$api_key - Fulaa API
$activationId - ID Sochii Abbaa
DEEBISAA:
JSON - wanta akkuma kanaan {'status': 'milkaa’ina', 'cost':200,"service":"tw","phone":777777777,"country":14},
DOGOGGORNI DANDA'AMU:
RENEW_ACTIVATION_NOT_AVAILABLE- lakkoofsi kun sochii dabalamaaf hin jiru
WRONG_ACTIVATION_ID - ID sochii abbaa sirrii miti
SIM_OFFLINE - Kaardii SIM offline
DEEBISAA:
Foormaatii deebii akkana ta’a:
{
"result": "OK"
}
HAALA_HAQAME - sochiin haqameera
NO_CALL- bilbilli hin fudhatamne
PARSE_COUNT_EXCEED- daangaa yaalii hiikkoo (hanga guddichi 4 dha)
DOGOGGORNI DANDA'AMU:
WRONG_ACTIVATION_ID - ID dogoggora, sochiinsii hin jiru
ERROR_SQL - dogongora sql-server
BAD_KEY - API key sirrii hin taane
GOCHA DOGOGGORAA - gocha dogoggoraa
API kireeffachuu
Qajeeltoota:
$api_key - Fulaa API
$time* - yeroo kireeffachuu (kan dursee: sa'aatii 4)
$operator* - hojjetuun mobaayilaa lakkoofsichaa, isin tokko tokkoon kan addaan baafaman commaan ibsuu dandeessu (kan dursee: Kamiyyuu)
$country* - biyya (kan dursee: Raashiyaa)
$incomingCall * - yoo darbe "true"lakkoofsa tajaajila bilbila fudhachu deeggarsu argadhu
DEEBISAA:
Deebiin tajaajilichaa foormaatii JSON keessatti ta'a, fakkeenya:
{ "countries": { "0": 0 }, "operators": { "0": "aiva", "1": "any", "2": "beeline", ... "16": "yota" }, "services": { "full": { "cost": 42.93, "quant": 20 }, "vk": { "cost": 21.95, "quant": 20 }, "ok": { "cost": 7.68, "quant": 55 }, "ot": { "cost": 5.2, "quant": 42 } } }
DOGOGGORNI DANDA'AMU:
BAD_KEY - API key sirrii hin taane
OUT_OF_STOCK - lakkoofsonni biyya sanaaf hin jiran
Qajeeltoota:
$api_key - Fulaa API
$service - tajaajila lakkoofsa argachuuf barbaaddan
$time* - yeroo kireeffachuu sa'aatii keessa (kan dursee: sa'aatii 4). Yeroo itti aanu kan argamu sa'aatii 12, ergasii 24. Yeroo guyyaa tokkoo fi caalaatti kireeffachuu gaafattan, darbuu qabdu: 24, 48, 72, kkf.
$operator* - hojjetuun mobaayilaa lakkoofsichaa, isin tokko tokkoon kan addaan baafaman commaan ibsuu dandeessu (kan dursee: Kamiyyuu)
$country* - biyya (kan dursee: Raashiyaa)
$url * - hidhaa webhook (kan dursee hin ilaalamne)
$incomingCall * - yoo darbe "true"lakkoofsa tajaajila bilbila fudhachu deeggarsu argadhu
* filannoo dirqamaa miti. Yoo hin ibsamne, filannoon dursee ni fayyadamama.
DEEBISAA:
Deebiin tajaajilichaa foormaatii JSON keessatti ta'a, fakkeenya:
{ "status": "success", "phone": { "id": 1049, "endDate": "2020-01-31T12:01:52", "number": "79959707564" } }
DOGOGGORNI DANDA'AMU:
BAD_KEY - API key sirrii hin taane
Deebisaa foormaatii json keessatti:
{ "status": "error", "message": "*possible_answer*" }
Deebiwwan danda'amaniin bakka keessatti "message":
TAJAJILA DOGOGGORAA - tajaajili hin ibsamne yookaan maqaan dogoggora dha
NO_BALANCE - maallaqa herreega keessaa hin jiru
LAKKOOFNI HIN JIRU - lakkoofsi hin jiru
ACCOUNT_INACTIVE - lakkoofsi hin jiru
SERVER_ERROR - dogoggora sarvarii
DAANGAA CHAANELII - akkaawuntichi cufame
Qajeeltoota:
$api_key - Fulaa API
$id - ID Kireeffachuu deebisa keessatti yeroo lakkoofsa ajjeessitan argame
$page* - lakkofsa fuula filannoon irraa eegalu (lakkofsi fuulaa 0 irraa eegala, haaraa irraa kaanee; kan dursee 0 dha)
$size* - guddina fuulaa (kan dursee 10)
* filannoo dirqamaa miti. Yoo hin ibsamne, filannoon dursee ni fayyadamama.
DEEBISAA:
Deebiin tajaajilichaa foormaatii JSON keessatti ta'a, fakkeenya:
{ "status": "success", "quantity": "2", "values": { "0": { "phoneFrom": "79180230628", "text": "5", "service": "ot", "date": "2020-01-30 14:31:58" }, "1": { "phoneFrom": "79180230628", "text": "4", "service": "ot", "date": "2020-01-30 14:04:16" } } }
* milkaa'inni yoo sms jiraatu qofa (sanduuqi 'quantity' > 0).
DOGOGGORNI DANDA'AMU:
BAD_KEY - API key sirrii hin taane
Deebisaa foormaatii json keessatti:
{ "status": "error", "message": "*possible_answer*" } Deebiwwan danda'amaniin bakka keessatti "message": NO_ID_RENT - ID kireeffachuu hin ibsamne INVALID_PHONE - lakkoofsi kun kan kee miti (ID kiraa sirrii hin taane) STATUS_FINISH - kaffaltiin kiraa raawwatamee xumurameera HAALA_HAQAME - kiraa haqamee, maallaqi deebi'ee kennameera STATUS_WAIT_CODE - SMS jalqabaa eeggachaa jira STATUS_REVOKE - Lakkoofsi cufameera, maallaqi kee deebi'ee kennameera
Qajeeltoota:
$api_key - Fulaa API
$id - ID Kireeffachuu deebisa keessatti yeroo lakkoofsa ajjeessitan argame
$status - koodii jijjiirama haala (lakkoofsa)
Haalli kun ta'uu danda'a:
DEEBISAA:
Deebiin tajaajilichaa foormaatii JSON keessatti ta'a:
{ "status": "success" }
DOGOGGORNI DANDA'AMU:
BAD_KEY - API key sirrii hin taane
Deebisaa foormaatii json keessatti:
{ "status": "error", "message": "*possible_answer*" }
Deebiwwan danda'amaniin bakka keessatti "message":
NO_ID_RENT - ID kireeffachuu hin ibsamne
INCORECT_STATUS - haalli dhabee ykn dogoggoraan ibsame
CANT_CANCEL - kiraa haquun hin danda'amu (daqiiqaa 20 ol ta'eera)
INVALID_PHONE - lakkoofsi kun kan kee miti (ID kiraa sirrii hin taane)
ALREADY_FINISH - kiraa duraanuu xumurameera
ALREADY_CANCEL - kiraa duraanuu haqameera
SERVER_ERROR - dogoggora sarvarii
👉Ijannoo! Mala kun lakkoofsota 10 dhuma qofa agarsiisa. Lakkoofsota dabalu barbaaddu yoo taate, fayyadami getRentStatus mala haalota qorachuuf.
Qajeeltoota:
$api_key - Fulaa API
DEEBISAA:
Deebiin tajaajilichaa foormaatii JSON keessatti ta'a:
{ "status": "success", "values": { "0": { "id": "12345", "phone": "79181234567" }, "1": { "id": "12345", "phone": "79181234568" } } }
DOGOGGORNI DANDA'AMU:
BAD_KEY - API key sirrii hin taane
GOCHA DOGOGGORAA - gocha dogoggoraa
Deebisaa foormaatii json keessatti:
{ "status": "error", "message": "*possible_answer*" }
Deebiwwan danda'amaniin bakka keessatti "message":
LAKKOOFNI HIN JIRU - lakkoofsota kireeffaman hin jiran
SERVER_ERROR - dogoggora sarvarii
Qajeeltoota:
$api_key - Fulaa API
$id - id kiraa
$rent_time- yeroo kireessuu (kan dursee kaa'ame: sa'aatii 4)
DEEBISAA:
Deebiin tajaajilichaa foormaatii JSON keessatti ta'a:
{ "status": "success", "phone": { "id": 1049, "endDate": "2020-01-31T12:01:52", "number": "79959707564"} }
Yeroo kiraa xumurame dheereffamu yoo ta'e, ammas ni ajajama, id haaraan ni kennama
DOGOGGORNI DANDA'AMU:
BAD_KEY - API key sirrii hin taane
GOCHA DOGOGGORAA - gocha dogoggoraa
SERVER_ERROR - dogoggora sarvarii
Deebisaa foormaatii json keessatti:
{ "status": "error", "message": "*possible_answer*", "info": "*details*" }
Deebiwwan danda'amaniin bakka keessatti "message":
NO_ID_RENT - ID kiraa hin jiru
INVALID_TIME - yeroon dogoggora. Sa'aatii 4 hanga 1344tti argamu
MAX_HOURS_EXCEED - Yeroon guddaan argamu darbeera
guddaa - yeroon guddaan argamu
INVALID_PHONE - ID kiraa dogoggora
RENT_DIE - yeroo lakkoofsa bilbilaa xumurameef, kireeffachuu dideera
NO_BALANCE - maallaqa gahaa hin qabdu
DAANGAA CHAANELII - akkaawuntichi cufame
* mala kun kireeffannaa operator MTT qofaaf kan argamuudha.
Qajeeltoota:
$api_key - Fulaa API
$id - id kiraa
$rent_time - yeroo kireeffannaa
DEEBISAA:
Deebiin tajaajilichaa foormaatii JSON keessatti ta'a:
{ "status": "milkaa'ina", "gati": 6.33 }
DOGOGGORNI DANDA'AMU:
BAD_KEY - API key sirrii hin taane
GOCHA DOGOGGORAA - gocha dogoggoraa
SERVER_ERROR - dogoggora sarvarii
Deebisaa foormaatii json keessatti:
{ "status": "error", "message": "*possible_answer*" }
Deebiwwan danda'amaniin bakka keessatti "message":
NO_ID_RENT - ID kiraa hin jiru
INVALID_PHONE - ID kiraa dogoggora
INVALID_TIME - sa'aawwan sirrii miti
RENT_DIE - yeroo lakkoofsa bilbilaa xumurameef, kireeffachuu dideera
MAX_HOURS_EXCEED - Yeroon guddaan argamu darbeera
guddaa - yeroon guddaan argamu
DAANGAA CHAANELII - akkaawuntichi cufame
API JAVA
Maktabaa (library) kana Maven keessatti hamachi
<artifactId>SMSActivateApi</artifactId>
<version>1.0</version>
</dependecy>
Fakkeenya galmeessuu kanaan ilaaluu dandeessa liinkii MavenRepository
Kilaasii guddicha API SMS-Activate waliin walqunnamuuf fe'i.
Maktabaa kana itti fayyadamuuf, furmaata API barbaachisa; fuula kana irratti fi liinkii gadiitti argachuu dandeessa.
SMS-Activate API-KeyBalansii ammaa akkaawuntii kee irra jiru argachuuf, mala kana fayyadami getBalance... Yoo balansii dabalatee cashbackis si hawwate ta'e, mala kana waami getBalanceAndCashBack.
Mala getBalanceAndCashBack objektii kilaasii deebisaSMSActivateGetBalanceAndCashBack.
Qajeeltoota:
HIN JIRU
GOSA DEEBII:
BigDecimal
Qajeeltoota:
HIN JIRU
GOSA DEEBII:
Qajeeltoota:
countryId(Integer) - eenyummaa biyyaa.
service(String) - maqaa gabaabaa tajaajilaa.
forward*(boolean) - lakkoofsa dabarsa bilbilaa (call forwarding) qabu gaafachuu fi dhiisuu.
operatorSet*(Set) - kutaalee hojjetootaa.
phoneException*(Set) - maqqaalawwan Raashiyaa qofa dhiisan, kutaa lakkoofsota 3 hanga 6 (7918,7900111).
* sanduuqa filannoo. Yoo waan tokkollee hin eeramne, hammamni default akka qindoomina profile keetiitti argamu ni kennama.
GOSA DEEBII:
Qajeeltoota:
countryId(Integer) - eenyummaa biyyaa.
operatorSet*(Set) - kutaalee hojjetoota tajaajilaaf argamaniidha
GOSA DEEBII:
Qajeeltoota:
id(Integer) - adda baasuu sochii
service(String) - maqaa gabaabaa tajaajilaa.
Bakka adda baasuu sochii, wanta class fudhatame dabarsuu dandeessa SMSActivateActivation erga mala itti fayyadamte booda getNumber ykn tokko sochiiwwan erga itti fayyadamee booda getMultiServiceNumber.
GOSA DEEBII:
Qajeeltoota:
countryId(Integer) - eenyummaa biyyaa.
serviceMap(Set) - kutaalee tajaajiloota sochiin isaanii bitameef
multiForwardList(List) - tarree tajaajiloota bilbila ceesisuun itti danda'amu
operatorSet(Set) - kutaalee hojjetootaa.
GOSA DEEBII:
Qajeeltoota:
HIN JIRU
GOSA DEEBII:
Qajeeltoota:
countryId(Integer) - eenyummaa biyyaa.
service(String) - maqaa gabaabaa tajaajilaa.
GOSA DEEBII:
Qajeeltoota:
countryId(Integer) - eenyummaa biyyaa.
GOSA DEEBII:
Qajeeltoota:
activationId(Integer) - adda baasuu sochii
Bakka adda baasuu sochii, wanta class fudhatame dabarsuu dandeessa SMSActivateActivation erga mala itti fayyadamte booda getNumber ykn tokko sochiiwwan erga itti fayyadamee booda getMultiServiceNumber.
GOSA DEEBII:
Qajeeltoota:
id(Integer) - adda baasuu sochii
status(SMSActivateClientStatus) - haala sochiif kaa'amuu qabu
Bakka adda baasuu sochii, wanta class fudhatame dabarsuu dandeessa SMSActivateActivation erga mala itti fayyadamte booda getNumber ykn tokko sochiiwwan erga itti fayyadamee booda getMultiServiceNumber.
GOSA DEEBII:
Qajeeltoota:
HIN JIRU
GOSA DEEBII:
Qajeeltoota:
activationId(Integer) - adda baasuu sochii
Bakka adda baasuu sochii, wanta class fudhatame dabarsuu dandeessa SMSActivateActivation erga mala itti fayyadamte booda getNumber ykn tokko sochiiwwan erga itti fayyadamee booda getMultiServiceNumber.
GOSA DEEBII:
Algoriizimii barreeffama guutuu SMS sochii waliin fudhachuuf
Lakkoofsa method getNumber fayyadamuun argachuu, ergasii gochawwan hordofan ni danda’amu:
CANCEL - 8 - Sochii haqu (yoo lakkoofsi si hin malle)
MESSAGE_WAS_SENT - SMS ergamuu isaa beeksisi (Barreeffama guutuu SMS fudhachuuf dirqama)
Yeroo haala MESSAGE_WAS_SENT dirqamaan qindeeffatamanii booda, haalawwan sochii fi yeroo eeggannoo SMS waliin ta’uun, mala waitSMS fayyadamuun SMS fudhachuuf jijjiirama qindeessi.
Erga SMS fudhatamee booda, mala getFullSMS fayyadamuun argachuu dandeessa, ergasii barreeffama guutuu mala getText() fayyadamuun agarsiisi.
Ergasii, sochiiwwan haalawwan armaan gadiitti qindeessuu dandeessa:
Haala MESSAGE_WAS_SENT waliin sochii raawwachuuf:
CANCEL - Sochii haquu
Akkuma koodii argatan booda:
REQUEST_ONE_MORE_CODE - SMS biraa gaafadhu
FINISH - Koodii SMS mirkaneessi fi sochii xumuri
Haala REQUEST_ONE_MORE_CODE waliin sochii raawwachuuf:
FINISH - Koodii SMS mirkaneessi fi sochii xumuri
Qajeeltoota:
countryId(Integer) - eenyummaa biyyaa.
service(String) - maqaa gabaabaa tajaajilaa.
hours(Integer)* - yeroo kireeffannaa
operator(String)* - maqaa hojjettoota mobaayilaa
urlWebhook(String)* - hidhaa webhook (Dursaan hin ilaalamu)
WebHook maali?* jijjiirama filannoo. Yoo hin eeramne, dursa kan ta’u
GOSA DEEBII:
Qajeeltoota:
countryId(Integer) - eenyummaa biyyaa.
operatorSet(Set) - kuusaa hojjettoota mobaayilaa
hours(Integer)* - yeroo kireeffannaa
* jijjiirama filannoo. Yoo hin eeramne, dursa kan ta’u
GOSA DEEBII:
Qajeeltoota:
rentId(Integer) - lakkoofsa addaa lakkoofsa kireeffatamee
Bakka rentId, wanta saffisa argame dabarsuu dandeessa SMSActivateRentActivation erga mala itti fayyadamte booda getRentNumber
GOSA DEEBII:
Email API
Ibsa haalawwan API
3 - Eeggachaa jira
4 - Haqame
5 - Milkaa’eera
IBSA:
Qajeelfama REST API cimsanii hordofuu fi sanduuqawwan imeelii gmail.com baay’inaan Telegram galchuuf.
Qajeeltoota:
$api_key - Fulaa API
$site- Saayitii imeeliif barbaaddu
DEEBISAA:
Deebiin tajaajilichaa foormaatii JSON keessatti ta'a, fakkeenya:
{
"status":"OK",
"response":{
"zones":[
{
"name":"info",
"cost":2.5
},
...
],
"popular":[
{
"name":"mail.ru",
"cost":6,
"count":159008
},
...
]
}
}
DOGOGGORNI DANDA'AMU:
BAD_SITE- Saayitiin hin eeramne
BAD_KEY - API key sirrii hin taane
GOCHA DOGOGGORAA - gocha dogoggoraa
Qajeeltoota:
$api_key - Fulaa API
$site - saayitii imeeliif barbaaddu
$mail_type - gosa imeelii: domeenii ykn naannolee beekamoo (1 - naannolee 2 - beekamoo)
$mail_domain - naannoo ykn domeenii filatame
DEEBISAA:
Deebiin tajaajilichaa foormaatii JSON keessatti ta'a, fakkeenya:
{
"status":"OK",
"response":{"email":"[email protected]","id":241}
}
DOGOGGORNI DANDA'AMU:
BAD_KEY - API key sirrii hin taane
GOCHA DOGOGGORAA - gocha dogoggoraa
MAIL_TYPE_ERROR - domeeniin akkasii bakka bu'aa site'eef hin jiru
DAANGAA CHAANELII - akkaawuntichi cufame
Qajeeltoota:
$api_key - Fulaa API
$id- Id ergamaa deebiisuun barbaachisaa ta'eef
DEEBISAA:
Deebiin tajaajilichaa foormaatii JSON keessatti ta'a, fakkeenya:
{
"status": "OK",
"response": {
"email": "[email protected]",
"id": 360
}
}
DOGOGGORNI DANDA'AMU:
BAD_KEY - API key sirrii hin taane
GOCHA DOGOGGORAA - gocha dogoggoraa
BLOCKED_SITE - websaayitii dhorkame
BAD_BALANCE - maallaqa gahaa hin qabdu
ACTIVATION_NOT_FOUND - sochiin hin argamne
DAANGAA CHAANELII - akkaawuntichi cufame
Qajeeltoota:
$api_key - Fulaa API
$page- lakkoofsa fuula
$per_page- baay'ina bittoota fuula tokkorratti
$search- barbaadduu
$sort- qajeelcha qindeessuu. (gadii, olii)
DEEBISAA:
Deebiin tajaajilichaa foormaatii JSON keessatti ta'a, fakkeenya:
{
"status":"OK",
"response":{
"list":[
{
"id":"241",
"site":"apple.com",
"email":"[email protected]",
"status":"3",
"value":null,
"cost":"6.00",
"date":"2023-10-06 14:24:13",
"full_message":""
}
],
"pages":1,
"count":1
}
}
Qajeeltoota:
$api_key - Fulaa API
$id- id bittootaa
DEEBISAA:
Deebiin tajaajilichaa foormaatii JSON keessatti ta'a, fakkeenya:
{
"status":"OK",
"response":true
}
DOGOGGORNI DANDA'AMU:
EARLY_CANCEL_DENIED - Ergamaa daqiiqaa 2 jalqabaa keessatti haquu hin dandeessu.
Qajeeltoota:
$api_key - Fulaa API
$id- id ergamaa bitamee, ergamaa erga bitatanii booda deebi'a
DEEBISAA:
Deebiin tajaajilichaa foormaatii JSON keessatti ta'a, fakkeenya:
{
"status":"OK",
"response":{
"value":"Содержания письма"
}
}
Sofitweerii Michuu API
Qajeeltoota:
$api_key - Fulaa API
$id- Id softiweerii bituu barbaaddan
DEEBISAA:
Deebiin tajaajilichaa foormaatii JSON keessatti ta'a, fakkeenya:
{
"status": "success",
"key": "F5qrzFoY6afj3zrEq7SeMplbx",
"manual": "Software download link:"
}
DOGOGGORNI DANDA'AMU:
BAD_DATA - ID dogoggoraa ykn ID lakkoofsa miti
GOCHA DOGOGGORAA - gochaa sirrii hintaane ykn gurgurtaan mirkanaa'e hin taane.
<?php
include_once ("smsactivateApi.php");//Inclusion of a class in a project
$sms = new SMSActivate($API_KEY);//Create class instance SMSActivate
$freeSlots = $sms->getNumbersStatus(0, 'tele2');//Get the number of available numbers for the country of Russia and the tele2 operator
echo "Номеров Вконтакте: " . $freeSlots['vk']."\n";//Show for Vk
echo "Номеров Whatsapp: " . $freeSlots['wa']."\n";//Show for whatsapp
var_dump($freeSlots); //Show all services with quantity
$array=$activate->getTopCountriesByService(); //Get an array whose elements contain information for each country
$balance = $sms->getBalance();//Get balance
echo "On the account " . $balance." rub.\n";//Show balance
$balance = $sms->getBalanceAndCashBack();//Request a balance with cashback account
echo "On the account " . $balance." rub.\n";//Request a balance with cashback account
$operators = $sms->getOperators();
//Get operators for all countries
if (in_array('mts', $operators['countryOperators'][0])) {
//check if 'mts' is available for Russia
//perform an action
}
if (in_array('chinamobile', $operators['countryOperators'][3])) {
//check if 'chinamobile' is available for China
//perform an action
}
$activations = $sms->getActiveActivations();
$number = $sms->getNumber('ok',0, 0, 'tele2');//Get Odnoklassniki number without forwarding
echo "Activation № " . $number['id']. "Phone ". $number['number'] \n";//Show id and activation number
$result = $sms->getNumber('vk', 0 , 1);
if (!is_array($result)) {
echo 'Ошибка: ' . $result . '\n';//If an error occurs, a string will be returned, if successful, an array will be returned.
} else {
echo 'Id: ' . $result['id'] ."\n";
echo 'Номер: ' . $result['number'] ."\n";
}
$result = $sms->getNumberV2('vk', 0 , 1);
$number = $sms->getMultiServiceNumber('ok,vk,vi,av','0,0,0,1', 0, 'tele2');//Get a number for services Odnoklassniki, Vkontakte, Viber without call forwarding and Avito with call forwarding
foreach ($number as $value) {
echo "Activation № " . $value['activation']. " for service ". $value['service'] ."\n";
}
echo "Number " . $value['phone'] ."\n";//Show activation id and number
$status = $sms->setStatus($number['id'], 3);//Change activation status by id (get 1 more code)
$status = $sms->getStatus($number['id']);//Get activation status by id
if (is_array($status) {
echo "статус : " . $status['status'];//Can be STATUS_OK or STATUS_WAIT_RETRY, otherwise a line with error text will be returned
echo "код: " . $status['code'];
} else {
echo $status ."\n";
}
$incomingCall = $sms->getIncomingCallStatus($id);//Get activation data by call
echo $incomingCall['phone'] //Show incoming number
$prices = $sms->getPrices(1, 'vk');//Get the current price for the service
echo "Price for VK (Ukraine) : " .$prices[1]['vk']['cost']." rub. quantity: ". $prices[1]['vk']['count'];//Show the result
$countries = $sms->getCountries();//Get a list of all countries
$additional = $sms->getAdditionalService('fx', $id);//Get additional activation for PGbonus service based on id activation
echo "Activation no.: " . $additional[id] . " Telephone: " . $additional[number];//Show the result
$getAvailableRentNumbers = $sms->getRentServicesAndCountries('2');//Request available countries for rent and services (for 2 hours for all operators)
echo "Full rental - Cost:" . $getAvailableRentNumbers['services']['full']['cost'] . " Quant :" .$getAvailableRentNumbers['services']['full']['quant'] ." \n"; //Display full price information
foreach( $getAvailableRentNumbers['operators'] as $value) {
echo " Operator " . $value ."\n"; }//List operators
$getRentNumber = $sms->getRentNumber('vk','10','0','yota');//Get a number for rent for Vkontakte for 10 hours, operator 'Yota', country - Russia
if ($getRentNumber['status'] === 'success'){
echo "The rental was successful! Your phone number is: " . $getRentNumber['phone']['number']." \nRent expiration : ". $getRentNumber['phone']['endDate']." \nId numbers :" .$getRentNumber['phone']['id'] ; }//Display rental information
else
echo "Error code : " . $getRentNumber['message'];
$getRentStatus = $sms->getRentStatus($getRentNumber['phone']['id']);//Get the rent status with id from the received number
if ($getRentStatus['status'] == 'success'){
foreach( $getRentStatus['values']as $index => $value) {
echo " Message " . $index .": from the number - " . $value['phoneFrom'] . " Service - " . $value ['service'] . "message text - " . $value['text'] . "Date - " . $value['date']; } }//display a list of messages received while renting a phone
else
echo "Error code : " . $getRentStatus['message'];
$setRentStatus = $sms->setRentStatus($getRentNumber['phone']['id'],1);//Set rental status 'finish' with id from received number
if ($setRentStatus['status'] == 'success')
echo " Status change was successful! ";
else
echo "Error code : " . $setRentStatus['message'];
$getRentList = $sms->getRentList();//Get a list of currently rented numbers
if (getRentList['status'] == 'success')
foreach( $getRentList['values'] as $value) {
echo " ID " . $value["id"] . " Number " . $value["phone"] ."\n"; }//List numbers
else
echo "Error code : " . $getRentList['message'];
$result = $sms->continueRentNumber($id);//Extend the lease of activation id for 4 hours (by default)
if ($result['status'] == 'success') {
echo "Number: " . $result['phone']['number']"//Display number
echo "id: " . $result['phone']['id']"//Display activation id
echo "The lease is valid until: " . $result['phone']['endDate']"//Display the date and time of the end of the lease
} else {
echo "Error code : " . $result['msg'];
}
$result = $sms->getContinueRentPriceNumber($id, 12);//Get the cost of renewing the lease to activate the id for 12 hours
if ($result['status'] == 'success') {
echo " Renewal cost " . $result['price'];//Withdraw the cost
} else {
echo "Error code: " . $result['message']; //Display error code
}
from sms-activate.garden import SMSActivateAPI
# SMSActivateAPI Contains all basic tools for working with the SMSActivate API
sa = SMSActivateAPI(API_KEY)
sa.debug_mode = True
# Used for debugging. When debug_mode is active, all responses from the server and class will be output to the console
print(sa.version())
# Returns the current version of the library
status = sa.getNumbersStatus(country=0, operator='tele2')
try:
print(status['vk_0']) # 274789
except:
print(status['message']) # Error text
result = sa.getTopCountriesByService('vk')
try:
print(result[0]['count']) # 2350
except:
print(result['message']) # Error text
balance = sa.getBalance() # {'balance': '100.00'}
try:
print(balance['balance']) # 100.00
except:
print(balance['message']) # Error text
balance = sa.getBalanceAndCashBack() # {'balance': '100.00'}
try:
print(balance['balance']) # 100.00
except:
print(balance['message']) # Error text
operators = sa.getOperators(country=0)
try:
print(operators['countryOperators']['0'])
except:
print(operators['error']) # Error status
activations = sa.getActiveActivations()
try:
print(activations['activeActivations'])
except:
print(activations['error']) # Error status
number = sa.getNumber(service='vk', operator='tele2', country=0, verification="true") # {'activation_id': 000000000, 'phone': 79999999999}
try:
print(number['phone']) # 79999999999
except:
print(number['message']) # Error text
number = sa.getNumberV2(service='vk', country=0)
try:
print(number['phoneNumber']) # 79999999999
except:
print(number['message']) # Error text
multinumber = sa.getMultiServiceNumber(service='fb,ig', operator='tele2', country=0) # [{'phone': '79999999999', 'activation': 000000000, 'service': 'fb'}, {'phone': '79999999999', 'activation': 000000001, 'service': 'ig'}]
try:
print(multinumber[0]['phone']) # 79999999999
except:
print(multinumber['message']) # Error text
status = sa.setStatus(id=000000000, status=1) # ACCESS_READY
try:
print(status) # ACCESS_READY
except:
print(status['message']) # Error text
status = sa.getStatus(id=000000000) # STATUS_WAIT_CODE
try:
print(sa.activationStatus(status)) # {'status': 'STATUS_WAIT_CODE', 'message': 'Ожидание смс'}
except:
print(status['message']) # Error text
status = sa.getIncomingCallStatus(id=000000000)
try:
print(status['status']) # 2
except:
print(status['message']) # Error text
prices = sa.getPrices(service='fb', country=0)
try:
print(prices['0']) # {'fb': {'cost': 9, 'count': 27934}}
except:
print(prices['message']) # Error text
countries = sa.getCountries()
try:
print(countries['0']['eng']) # Russia
except:
print(countries['message']) # Error text
service = sa.getAdditionalService(id=000000000, service='ig')
try:
print(service['phone']) # 79999999999
except:
print(service['message']) # Error text
service = sa.getRentServicesAndCountries(time=4, operator='tele2', country=0)
try:
print(service['services']['full']['cost']) # 100.00
except:
print(service['message']) # Error text
rent = sa.getRentNumber(service='ig', time=4, operator='tele2', country=0)
try:
print(rent['phone']['number']) # 79999999999
except:
print(rent['message']) # Error text
status = sa.getRentStatus(000000000)
try:
print(status['values']['0']['text']) # SMS
except:
print(status['message']) # Error text
status = sa.setRentStatus(id=000000000, status=1)
try:
print(status['status']) # success
except:
print(status['message']) # Error text
rent = sa.getRentList()
try:
print(rent['values']['0']['phone']) # 79999999999
except:
print(rent['message']) # Error text
rent = sa.continueRentNumber(id=000000000, time=4)
try:
print(rent['phone']['number']) # 79999999999
except:
print(rent['message']) # Error text
rent = sa.getContinueRentPriceNumber(000000000)
try:
print(status['price']) # 4.00
except:
print(status['message']) # Error text
import ru.sms_activate.SMSActivateApi;//Inclusion of a class in a project
SMSActivateApi smsActivateApi = new SMSActivate("API_KEY");//Create an instance of the SMSActivate class
BigDecimal balance = smsActivateApi.getBalance();//Get the current account balance
System.out.println("Balance: "+ balance)//Withdraw the received balance
SMSActivateGetBalanceAndCashbackResponse smsActivateGetBalanceAndCashbackResponse = smsActivateApi.getBalanceAndCashback();//Get current balance and cashback
System.out.println("Cashback + balance: "+ smsActivateGetBalanceAndCashbackResponse.getBalanceAndCashback());//Withdraw the amount of balance and cashback
SMSActivateActivation activation=smsActivateApi.getNumber(0,"vk")//Get activation for the Vkontakte service in Russia
System.out.println(activation);//Withdraw the received activation
SMSActivateGetNumbersStatusResponse smsActivateGetNumbersStatusResponse= smsActivateApi.getNumberStatus(0,null);//Get information about available services for Russia
SMSActivateServiceInfo go = smsActivateGetNumbersStatusResponse.getSMSActivateServiceInfoByShortName("go");//Getting information about numbers for the Google service
System.out.println("Short name service: " + go.getShortName();//Get the short name of the service
System.out.println("count phone numbers: "+ go.getCountPhoneNumber();//Get the number of numbers for the service
System.out.println(""Forwarding is available: "+ go.isForward() ? "yes" : "no"//Find out if the service has a redirect
SMSActivateActivation activation=smsActivateApi.getNumbersStatus(0,"ot",true);//Activations
smsActivateApi.setStatus(activation, SMSActivateClientStatus.MESSAGE_WAS_SENT);//Setting the MESSAGE_WAS_SENT status after sending SMS for the number
SMSActivateActivation childActivation =smsActivateApi.getAdditionalService(activation,"av");//Requesting a new activation for an additional service
System.out.println(childActivation);//Displaying information about additional activation
Set<String>operatorSet= new HashSet<>();
operatorSet.add("mts");//Adding an MTS operator to the set of operators
Map<String,Boolean>serviceMap= new HashMap<>();
serviceMap.put("av",false);//Adding the Avito service to the list of services (specify true if you need a service with redirection)
SMSActivateGetMultiServiceNumberResponse multiServiceNumberResponse=smsActivateApi.getMultiServiceNumber(0, serviceMap, operatorSet);//Getting activation for multiple services
multiServiceNumberResponse.getSMSActivateActivationList().forEach(activation->{
System.out.println("Id: " + activation.getId());
System.out.println("Number: " + activation.getNumber());
System.out.println("Service name: " + activation.getShortName());
}
//Displaying information about received activations
SMSActivateGetPricesResponse smsActivateGetPricesResponse=smsActivateApi.getPricesByCountryIdAndServiceShortName(0, "vk");//Obtaining a list of prices for Russia on the Vkontakte service. For a complete list of prices, use the getAllPrices () method;
SMSActivateGetPriceInfo vk=smsActivateGetPricesResponse.getPriceInfo(0, "vk");//Getting information about the Vkontakte service for Russia
System.out.println(">>> Cost: "+ vk.getCost());//Get a price for the service
System.out.println(">>> count phone numbers: " + vk.getCountPhoneNumbers());//Get the number of numbers for the service
SMSActivateActivation activation=smsActivateApi.getNumber(0,"vk")//Get activation for the Vkontakte service in Russia
System.out.println(activation);//Withdraw the received activation
SMSActivateGetStatusResponse getResponse = smsActivateApi.getStatus(activation);//Getting a status for activation
System.out.println(getResponse.getSMSActivateGetStatus());//Displaying information about the activation status
smsActivateApi.setStatus(activation, SMSActivateClientStatus.MESSAGE_WAS_SENT);//Setting the MESSAGE_WAS_SENT status after receiving SMS for the number
smsActivateApi.setStatus(activation, SMSActivateClientStatus.FINISH);//Setting the FINISH status after receiving SMS for the number
SMSActivateGetCountriesResponse smsActivateGetCountriesResponse =smsActivateApi.getCountries();//Getting a list of countries with information
SMSActivateCountryInfo countryInfo = smsActivateGetCountriesResponse.get(0)//Getting information about the first country on the list
System.out.println("Russian name: "+countryInfo.getRussianName();//Display the Russian name of the country
System.out.println("English name: "+countryInfo.getEnglishName();//Display the Russian name of the country
System.out.println("Support multi-service: "+ countryInfo.isSupportMultiService() ? "yes" : "no"//Show if the country supports multi-services
SMSActivateActivation activation=smsActivateApi.getNumber(0,"vk")//Get activation for the Vkontakte service in Russia
smsActivateApi.setStatus(activation, SMSActivateClientStatus.MESSAGE_WAS_SENT);//Setting the MESSAGE_WAS_SENT status after sending SMS for the number
String code=smsActivateApi.waitSms(activation,2)//Set receiving sms within 2 minutes
if(code == null) {
smsActivateApi.setStatus(activation, SMSActivateClientStatus.CANCEL);//Setting the CANCEL status if sms has not arrived
}
else{
SMSActivateGetFullSmsResponse smsActivateGetFullSmsResponse=smsActivateApi.getFullSms(activation)//Receiving sms text
System.out.println("Full SMS: "+smsActivateGetFullSmsResponse.getText());//SMS text output
}
SMSActivateRentActivation rentActivation= smsActivateApi.getRentNumber(0, "vk", 6);//Getting a number with rent
System.out.println(">> ID: "+rentActivation.getId());//Activation ID withdrawal
System.out.println(">> Number: "+rentActivation.getId());//Displaying the activation number
System.out.println(">> End date: "+rentActivation.getId());//Displaying the activation expiration date
SMSActivateGetRentServicesAndCountriesResponse smsActivateGetRentServicesAndCountriesResponse= smsActivateApi.getRentServicesAndCountries(0, null, 4);//Obtaining information on services and countries that support rental
smsActivateGetRentServicesAndCountriesResponse.getAllRentServices().forEach((serviceShortName, smsActivateRentService)->{
System.out.println("Service shortname: " + serviceShortName);
System.out.println(" count phone numbers: " + smsActivateRentService.getCountPhoneNumbers());
System.out.println(">> Cost: " + smsActivateRentService.getCost());
}
//Displaying information about received services
SMSActivateRentActivation rentActivation= smsActivateApi.getRentNumber(0, "vk");//Getting a number with rent
SMSActivateGetRentStatusResponse smsActivateGetRentStatusResponse= smsActivateApi.getRentStatus(rentActivation);//Getting activation status
System.out.println(">> Count sms: "+ smsActivateGetRentStatusResponse.getCountSms());//Displaying the number of sms on the rented number





















































