Protokol API ngam golloraade e SMS-Activate
API ko protokol hakkunde softuweer maa e server men
API ina haani ngam waɗde otomatizasiyoŋ proses heɓugol sms, otp, e pva e bannge maa
API men ina yahdi no feewi e lowreiji kaɓirɗe
Naamnale ɗee fof poti yahrude to https://api.sms-activate.ai/stubs/handler_api.php
POST walla GET request.
Naamnale ɗee fof poti jogyaade kle API e mbaydi parametre api_key GET
Awnu jaabawol protokol o e php Awnu jaabawol protokol o heewngol e PythonAPI Aktivasiyoŋ
Parametruuji:
$api_key - Kle API
$country * - limre leydi yiylo tablo
$operator * limre kuutorooɓe mobil, a waawi hollude limre keewɗe ceertindiraama e koma (ina tawee tan ngam:
** ina waɗi ngam $country = 0, $country = 1, $country = 2
JAABAWOL:
Jaabawol golle ɗee wonat e mbaydi json, yeru:
{"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}
To bannge geɗe gonɗe caggal tiiɗnal ko innde golle, caggal maande ndee ko so tawii haajotoo waylude. 0 - alaa. 1 - eey.
Parametruuji:
$api_key - Kle API
$service * - Golle yiylo tablo
* parametre cuɓaango. So wiytaaki, leyɗe ɓurɗe toowde ngam golle fof kollitortee e hoore mum.
$freePrice * - parametre cuɓaango. So ina rokkaa goonga, limoore e njoɓdi ndii ko Free Price hollirta ɗum
JAABAWOL:
Jaabawol golle ɗee wonat e mbaydi json, yeru:
{
0: {
"country: 0,
"count": 43575,
"price": 15.00,
"retail_price": 30.00
}, ...
}
$freePrice = goonga:
{
0: {
"country: 0,
"count": 43575,
"price": 15.00,
"retail_price": 30.00,
"freePriceMap": {
"15.00": 43242,
"18.00": 333
}
}, ...
}
Ɗaɓɓugol kaalis e konte cashback:
* hollirta kaalis o tawa a ƴeewii cashback keɓaaɗo, so a suɓii 'Huutoro cashback ngam dillinde' e teelte konte cashback
Parametruuji:
$api_key - Kle API
JAABAWOL:
ACCESS_BALANCE: 'kaalis konte'
JUUMRE BAŊŊE:
BAD_KEY - kle API mo alaa haala
ERROR_SQL - jammal sql-server
* hollata kala operatorji baawɗe heɓeede e nder leydi ndi yaltinaa, so tawii leydi ndi yaltinaaki - hollat kala operatorji baawɗe heɓeede e kala leydi
Parametruuji:
$api_key - Kle API
$country - kod leydi
JAABAWOL:
Jaabawol golle ngol wonat e mbaydi json:
{"status":"success", "countryOperators": {
"Country1Code": ["operator1Name","operator2Name","operator3Name", ...],
"Country2Code": ["operator1Name","operator2Name","operator3Name", ...],
...
}}
Misaal:
{"status":"success", "countryOperators": {
"0": ["beeline","megafon","mts", ...],
"1": ["life","mts","kyivstar","utel" ...],
...
}}
* nder 'countryOperators' - kleer (key) o wonat ko kod leydi
JUUMRE BAŊŊE:
BAD_KEY - kle API mo alaa haala
ERROR_SQL - jammal sql-server
OPERATORS_NOT_FOUND - alaa rekoduuji keɓaaɗi (yeru, leydi nde woodaa yaltinaa)
Parametruuji:
$api_key - Kle API
JAABAWOL:
Jaabawol golle ngol wonat e mbaydi json:
{"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",
}]
JUUMRE BAŊŊE:
BAD_KEY - kle API mo alaa haala
ERROR_SQL - jammal sql-server
NO_ACTIVATIONS - naatirɗe njiyataake (alaa aktivasiyoŋaaji gollotooɗi)
Parametruuji:
$api_key - Kle API
$service - golle ngam ordon yiylo tablo
$forward * - so aɗa haani njuɓɓinde limngal tawi ina jogii forward
* parametere cuɓaande, jaɓata 0 (waɗa hay huunde, siforaama no feewi), 1 (waɗ)
$maxPrice * - njoddu ɓurndu toowde nde a heɓata limngal e Njoddu Alaa
* parametere cuɓaande, so waɗaaka, buying o waɗat e njoddu laaɓtungu
$phoneException * - ittude prefiksuuji ngam limngale Risi. Naatnu e koma. Mbaydi winndugol: kod leydi e 3 haa 6 limre mask (yeru, 7918, 7900111). Njoddu default ko njoddu siforaaɗo e kont.
$operator* ko gollotooɗo telefon mobile limoore ndee, a waawi winndude ɗe no feewi e komaa (ko tan ngam **)
$activationType - sifaa dillere: 0 - e SMS (ko ɗum woni ko adii), 1 - e limoore, 2 - e wolde
$language - yamre ƴeewndo (ina haani ngam dillere e wolde) yiylo tablo
$userId * - ID kuutoro mo aɗa yiɗi daaɓnude sabu njeñtudi dillere bonnde, kono konte reseller oo waylotaako.
* bannge cuɓaango
** ina waɗi ngam $country = 0, $country = 1, $country = 2
$ref - yaltin ID referral.
$country - limre leydi yiylo tablo
$useCashBack* - heɓat ko goonga walla fenaande; so parametre o ko 'true', soodagol limoore o waɗetee ko e kuutorgol cashback. So a heddii alaa kaalis e balance cashback, soodagol garooji fof waɗetee ko e balance mawɗo. Ina himmi anndude wonde soodagol garooji fof kuutortoo ko cashback adan, caggal ɗuum balance mawɗo (hay so a yaltinii parametre 'false' caggal ɗuum).
* parametre cuɓaango, jaɓata 'true'
So a heɓii limoore rewrude e API, a jaɓii sariyaaji poroje sariyaaji poroje
JUUMRE BAŊŊE:
WRONG_MAX_PRICE:$min- njayri ɓurndi toowde nde winndaa ɗoo ina lesɗi ko jaɓaa
$min - njayri ɓurndi famɗude nde jaɓaa
BAD_ACTION - golle cuɓaaɗe ɗee njawaaki
BAD_SERVICE - innde servise ndee njawaaki
BAD_KEY - kle API mo alaa haala
ERROR_SQL - jammal sql-server
BANNED:'YYYY-m-d H-i-s' - waktu mo konte o daaɓnaa
WRONG_EXCEPTION_PHONE - prefikse ceertugol ɗii njawaaki
NO_BALANCE_FORWARD - kaalis heewaaɗo soodagol yaltinde wolde alaa
CHANNELS_LIMIT - konte o daaɓnaa
NO_NUMBERS - limoore alaa
So a ƴeewii heɓde limoore gollotooɗo keeriiɗo mo gollataa e leydi suɓaandi ndii, walla mo jogiiɗaa servise suɓaandi ndii, limoore gollotooɗo arano mo yahdi e parametre ƴeewndo o rokketee
metod o gollirta no metod getNumber, jaɓata parametre ɗeen e ɗe keddii ɗee, kono o rokka kadi kabaruuji dillere
Parametruuji:
$orderId- id dillere ummoraade e sistem reseller. Nde soodata, ɗii keɓe nannditinee e id dillere e reseller e sistem men. No nii, en njiɗi heɓde idempotence (orde wootere nde rewtataa laabi ɗiɗi).
JAABAWOL:
So tawii ko ɗaɓɓitannde ndee ina waawi, jaabawol ngol wonata e mbaydi nii:
{
"activationId": 635468024,
"phoneNumber": "79584******",
"activationCost": "12.50",
"countryCode": "0",
"canGetAnotherSms": "1",
"activationTime": "2022-06-01 17:30:57",
"activationOperator": "mtt"
}
So a ƴeewii heɓde limoore gollotooɗo keeriiɗo mo gollataa e leydi suɓaandi ndii, walla mo jogiiɗaa servise suɓaandi ndii, limoore gollotooɗo arano mo yahdi e parametre ƴeewndo o rokketee
JUUMRE BAŊŊE:
ORDER_ALREADY_EXISTS- order o sosaama ko adii
So a heɓii SMS e limoore, so a dartinii gollal Webhooks e nder teelte maa, en neldat humpitooji baɗtugol SMS e nokkuuji ɗi holli-ɗaa, rewrude e ɗaɓɓitannde POST
JAABAWOL:
Mbaydi jaabawol ngol wonata nii:
{
"activationId": 635468024,
"service": "go",
"text": "Your sms text",
"code": "Your sms code",
"country": 0,
"receivedAt": "2022-06-01 17:30:57",
}
Caggal neldugol ɗaɓɓitannde, en njahdata jaabawol ummoraade e script maa e daraja HTTP 200. So script maa jaabaaki, en neldat ɗaɓɓitannde e nder waktuuji 2, kono haa laabi 8 tan.
A waawi dartininde ngal gollal e nder teelte profile
Parametruuji:
$api_key - Kle API
$service - golle ngam ordon yiylo tablo
$forward * - so aɗa haani njuɓɓinde limngal tawi ina jogii forward
* parametre optional, geɗe yaltinirɗe ceertindiraama e komaa, limoore limoore yaltinirɗe foti fotde e limoore servisiiji neldaaɗi e nder parametre $service. Jaɓaama tan neldude servis 1 mo yaltinirgal, yeru "0,1,0,0" - ko goonga, "0,1,1,0" - ko fenaande. Joga 0 (waɗa hay huunde, default), 1 (waɗ)
$operator * - operator mobile limoore ndee, a waawi winndude limoore keewɗe ceertindiraama e komaa (ko jaɓaa tan e **):
$ref - yaltin ID referral.
$country - limre leydi yiylo tablo
So a heɓii limoore rewrude e API, a jaɓii sariyaaji poroje sariyaaji poroje
JAABAWOL:
NO_NUMBERS - limoore alaa
NO_BALANCE - kaalis o haatiima
{{'phone':phone,'activation':activation,'service':service},
{'phone':phone,'activation':activation,'service':service}}, to (phone - id golle, activation - Limoore telefone, service - Servis)
JUUMRE BAŊŊE:
BAD_ACTION - golle cuɓaaɗe ɗee njawaaki
BAD_SERVICE - innde servise ndee njawaaki
BAD_KEY - kle API mo alaa haala
ERROR_SQL - jammal sql-server
BANNED:'YYYY-m-d H-i-s' - waktu mo konte o daaɓnaa
Parametruuji:
$api_key - Kle API
$id - ID Activation
$forward * - limoore telefone nde a yiɗi yaltinde
* ɗum naamnaama tan so parametre neldaama e getNumber forward=1.
$status - daraja activation
1 - hollu no limoore ndee heewi (SMS neldaama e limoore ndee)
3 - ƴeewto kod goɗɗo (ko free)
6 - timmin activation *
8 - hollu wonde limoore ndee kuutoraama ko adii te uddu activation
* so daraja 'kod heɓaama' woodnoo - ina maaka ɗum no feewi te timmina, so 'preparation' woodnoo - ina ittina te maaka jillondiral, so daraja 'njahdata ƴeewtagol' woodnoo - waylita activation e SMS pendiing
** Waylude daraja activation mo laawol tabitinde rewrude e call suɓaama, so limoore ndee arrii, waawaa
Laawol laaɓtungol e jokkondiral API:
Heɓde limoore rewrude e laawol getNumber, caggal ɗuum golle ɗee ina mbaawi:
8 - uddu activation (so limoore ndee alaa faandaare e maa)
1 - hollu wonde SMS neldaama (optional)
E activation mo daraja mum 1:
8 - uddu activation
Caggal heɓde kod oo sahaa fof:
3 - ƴeewto SMS goɗɗo
6 - tabitin kod-SMS te timmin activation
E activation mo daraja mum 3:
6 - tabitin kod-SMS te timmin activation
JAABAWOL:
ACCESS_READY - heewgol limoore tabitinaama
ACCESS_RETRY_GET - ina jooɗii e njiylawu SMS keso
ACCESS_ACTIVATION - golle puɗɗinaama no feewi
ACCESS_CANCEL - puɗɗingol haɗaama
JUUMRE BAŊŊE:
EARLY_CANCEL_DENIED - jaɓaaka haɗde limoore e nder minitiiji 2 gadani
ERROR_SQL - jammal sql-server
NO_ACTIVATION - ID puɗɗingol ngol alaa
BAD_SERVICE - innde servise ndee njawaaki
BAD_STATUS - darnde nde wonaa ko adan
BAD_KEY - kle API mo alaa haala
BAD_ACTION - golle cuɓaaɗe ɗee njawaaki
WRONG_ACTIVATION_ID - ID moƴƴaaki walla ID oo wonaa limoore.
Parametruuji:
$api_key - Kle API
$id - ID Activation
JAABAWOL:
STATUS_WAIT_CODE - ina jooɗii e SMS
STATUS_WAIT_RETRY: 'kod mo yahrude, kod mo nanndataa' - ina jooɗii e laaɓnugol kod
STATUS_WAIT_RESEND - ina jooɗii e senditagol SMS *
* software o foti dakkude senditagol SMS te waylude darnde haa 6
STATUS_CANCEL - puɗɗingol haɗaama
STATUS_OK: 'kod puɗɗingol' - kod heɓaama
JUUMRE BAŊŊE:
NO_ACTIVATION - ID puɗɗingol ngol alaa
ERROR_SQL - jammal sql-server
BAD_KEY - kle API mo alaa haala
BAD_ACTION - golle cuɓaaɗe ɗee njawaaki
Parametruuji:
$api_key - Kle API
$id - ID Activation
JAABAWOL:
Mbaydi jaabawol ngol wonata nii:
{
"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,
}
}
STATUS_CANCEL - puɗɗingol haɗaama
JUUMRE BAŊŊE:
NO_ACTIVATION - ID puɗɗingol ngol alaa
ERROR_SQL - jammal sql-server
BAD_KEY - kle API mo alaa haala
BAD_ACTION - golle cuɓaaɗe ɗee njawaaki
Parametruuji:
$api_key - Kle API
$start - waktu e mbaydi Unix Timestamp (ko waawi) - gila e ñalawma honɗum ƴeewtotoo puɗɗingol
$end - waktu e mbaydi Unix Timestamp (ko waawi) - haa e ñalawma honɗum ƴeewtotoo puɗɗingol
$offset - woɗɗere element gadano artiraaɗo e jaabawol. Ko 0 so tawii hay huunde waylaaki
$limit - limoore ɓurnde mawnude e kelme artiraaɗe. Ɓurnde mawnude ko 100. Ko 50 so tawii hay huunde waylaaki.
JAABAWOL:
Mbaydi jaabawol ngol wonata nii:
[{
"id": 635468024,
"date": "2022-11-12 15:58:39",
"phone": "79918529716",
"sms": "sms":"["Your sms code"]",
"cost": 100 //Если активация не завершена, то cost = 0,
"status": "4",
}]
JUUMRE BAŊŊE:
ERROR_SQL - jammal sql-server
BAD_KEY - kle API mo alaa haala
BAD_ACTION - golle cuɓaaɗe ɗee njawaaki
Parametruuji:
$api_key - Kle API
$service - innde golle
JAABAWOL:
Mbaydi jaabawol ngol wonata nii:
[{
"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)
}]
JUUMRE BAŊŊE:
ERROR_SQL - jammal sql-server
BAD_KEY - kle API mo alaa haala
WRONG_SERVICE - golle moƴƴaaki
BAD_ACTION - golle cuɓaaɗe ɗee njawaaki
Parametruuji:
$api_key - Kle API
$id - ID Activation
JAABAWOL:
Jaabawol golle ɗee wonat e mbaydi json, yeru:
{"status":"2","phone":false}
DARNDJE BAWADE:
2 - puɗɗingol keso
3 - timmi no feewi
4 - haɗaama
5 - ruttaama
JUUMRE BAŊŊE:
BAD_KEY - kle API mo alaa haala
INVALID_ACTIVATION_ID - ID dillugol ngol wonaa goonga
Parametruuji:
$api_key - Kle API
$serviceInnde juutnde sevis (Tawa ko haani, so tawii ko fof sevis ɗin) yiylo tablo
$countryInnde kod leydi (Tawa ko haani, so tawii ko leydiiji ɗii fof) yiylo tablo
JAABAWOL:
JSON - obje e nder mbaydi
{"Country":{"Service":{"cost":Cost,"count":Count}}}
Parametruuji:
$api_key - Kle API
$serviceInnde juutnde sevis (Tawa ko haani, so tawii ko fof sevis ɗin) yiylo tablo
JAABAWOL:
JSON - obje e nder mbaydi
{"Service":{"Country":{"count":Quantity,"price":"Price"}}}
Parametruuji:
$api_key - Kle API
JAABAWOL:
JSON - obje e nder mbaydi {{'Страна':{'id':0,'rus':"Россия","eng:"Russia","chn":"俄罗斯","visible":1,"retry":1,"rent":1,"multiService":1}},
nde (
id : id leydi;
rus : innde leydi e Rusaare;
eng : innde leydi e Engleere;
chn : innde leydi e Sinuwaa;
visible : 0 - leydi ndii hollitaaka e dow site, 1 - hollitaama;
retry : 0 - SMS keertingol ALAA, 1 - woodi;
rent : 0 - leydi ndii njillinaaka, 1 - jillinaama;
multiService : 0-leydi ndii ALAA ngam multiservice, 1- woodi.)
Parametruuji:
$api_key- Kle API
$country *- ID Leydi. So a rokku leydi, en mirtat kaɓirɗe ɗe njogii njoɓdi ngam leydi suɓaandi ndii
$lang *- hol noone kuutortee ngam hollirde `name`. Njulaaji baawɗi: 'ru', 'en', 'es', 'cn'. Ko 'en' woni ko ɓuri heewde
* parametru optional
JAABAWOL:
JSON - obje e nder mbaydi { "status": "success", "services": [ { "code": "aoo", "name": "Pegasus Airlines" } ] }
So a heɓii SMS gadano ngam limoore mbaylaandi, a waawi soodude geɗe goɗɗe nannduɗe e Yula, Yandex, Avito, walla kala geɗal goɗngal
Njeñtudi sevis ɓeydotooɗo oo ko 5p tan
Parametruuji:
$api_key - Kle API
$service - ngam innde juutnde sevis, yiylo e taablo o yiylo tablo
$id - ID Dillugol Baaba
JAABAWOL:
ADDITIONAL:$id:$phone - dillugol keso sosaa no feewi. To ID woni ID dillugol ɓeydotooɗo, phone woni limoore telefoni
JUUMRE BAŊŊE:
WRONG_ADDITIONAL_SERVICE - Sevis ɓeydotooɗo mo wonaa goonga (sevis mbaylagol tan keɓetee)
WRONG_ACTIVATION_ID - ID Dillugol Baaba mo wonaa goonga
WRONG_SECURITY - jiiro waɗii so a ƴeewtii yo ID dillugol yaltinaa tawa alaa mbaylagol, walla dillugol timmuɗum/ndu waylaaki
REPEAT_ADDITIONAL_SERVICE - jiiro waɗata so a ƴeewtii yo a sooda sevis soodaama kadi ALAA-BALANS - Kaalis heewaaɗo alaa
ERROR_SQL- jiiro database, jokku e kuugal kaɓirɗe njokkondiral
So a waɗii dillugol no feewi e ndee limoore, a waawi waɗde ɗum kadi.
Njeñtudi dillugol ɓeydotooɗo anndirtee e dow leydi e sevis. Njeñtudi keeriiɗi ena mbaawi heɓeede e .
Parametruuji:
$api_key - Kle API
$activationId - ID Dillugol Baaba
JAABAWOL:
ACCESS_NUMBER:$id:$phone - dillugol keso sosaa no feewi. To $id woni ID dillugol ɓeydotooɗo, $phone woni limoore telefoni
JUUMRE BAŊŊE:
RENEW_ACTIVATION_NOT_AVAILABLE- limoore ndee alaa ngam dillugol ɓeydotooɗo
WRONG_ACTIVATION_ID - ID Dillugol Baaba mo wonaa goonga
ERROR_SQL- jiiro database, jokku e kuugal kaɓirɗe njokkondiral
NEW_ACTIVATION_IMPOSSIBLE- waawaa waɗde dillugol ɓeydotooɗo
NO_BALANCE - alaa kaalis e konte
A waawi anndude so limoore ndee ina tawaa ngam dillugol ɓeydotooɗo te a heɓa njeñtudi mum
Parametruuji:
$api_key - Kle API
$activationId - ID Dillugol Baaba
JAABAWOL:
JSON - obje e nder mbaydi {'status': 'success', 'cost':200,"service":"tw","phone":777777777,"country":14},
JUUMRE BAŊŊE:
RENEW_ACTIVATION_NOT_AVAILABLE- limoore ndee alaa ngam dillugol ɓeydotooɗo
WRONG_ACTIVATION_ID - ID Dillugol Baaba mo wonaa goonga
SIM_OFFLINE - SIM kart alaa e golle
JAABAWOL:
Mbaydi jaabawol ngol wonata nii:
{
"result": "OK"
}
STATUS_CANCEL - puɗɗingol haɗaama
NO_CALL- alaa noddital keɓaama
PARSE_COUNT_EXCEED- keerol ƴeewndo (ko 4 ɓuri heewde)
JUUMRE BAŊŊE:
WRONG_ACTIVATION_ID - ID moƴƴaani, dartinagol ngol woodataa
ERROR_SQL - jammal sql-server
BAD_KEY - kle API mo alaa haala
BAD_ACTION - golle cuɓaaɗe ɗee njawaaki
Rent Api
Parametruuji:
$api_key - Kle API
$time* - sahaa huurugol (so tawii ko e dow: waktuuji 4)
$operator* - kampanii telefon mobil limoore ndee, a waawi winndude ɗe no feewi tawa a ceertini majje e koma (so tawii ko e dow: Ko fof)
$country* - leydi (so tawii ko e dow: Riisi)
$incomingCall * - so naatnaama "true"keɓu limoore nde mbaawi jaaboo noddital
JAABAWOL:
Jaabawol golle ɗee wonat e mbaydi json, yeru:
{ "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 } } }
JUUMRE BAŊŊE:
BAD_KEY - kle API mo alaa haala
OUT_OF_STOCK - limoore leydi ndii alaa
Parametruuji:
$api_key - Kle API
$service - kaalis ngam heɓde limoore
$time* - sahaa huurugol e nder waktuuji (so tawii ko e dow: waktuuji 4). Sahaa garoowo ko waktuuji 12, caggal ɗuum 24. So a naamndii huurugol balɗe goote walla ɓurɗe ɗum, a foti naatnude: 24, 48, 72, wnl.
$operator* - kampanii telefon mobil limoore ndee, a waawi winndude ɗe no feewi tawa a ceertini majje e koma (so tawii ko e dow: Ko fof)
$country* - leydi (so tawii ko e dow: Riisi)
$url * - jokkol ngam webhook (ndaɗaaka so tawii ko e dow)
$incomingCall * - so naatnaama "true"keɓu limoore nde mbaawi jaaboo noddital
* parametre cuɓaaɗo. So winndaaki, parametre dow oo kuutoretee.
JAABAWOL:
Jaabawol golle ɗee wonat e mbaydi json, yeru:
{ "status": "success", "phone": { "id": 1049, "endDate": "2020-01-31T12:01:52", "number": "79959707564" } }
JUUMRE BAŊŊE:
BAD_KEY - kle API mo alaa haala
Jaabu e mbaydi json:
{ "status": "error", "message": "*possible_answer*" }
Jaabuuji baawɗi wonde e nder bannge "message":
BAD_SERVICE - kaalis laaɓtinaaki walla innde ndee moƴƴaani
NO_BALANCE - alaa kaalis e konte
NO_NUMBERS - limoore alaa
ACCOUNT_INACTIVE - limoore alaa
SERVER_ERROR - jillondiral server
CHANNELS_LIMIT - konte o daaɓnaa
Parametruuji:
$api_key - Kle API
$id - ID huurugol keɓaangol e jaabawol so a orderii limoore
$page* - limoore page o ummoraade (limoore page fuɗɗotoo ko 0, gila e hesere haa e kayre; dow oo ko 0)
$size* - mawnugol page (dow oo ko 10)
* parametre cuɓaaɗo. So winndaaki, parametre dow oo kuutoretee.
JAABAWOL:
Jaabawol golle ɗee wonat e mbaydi json, yeru:
{ "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" } } }
* tabitii tan so SMS woodi (bannge 'quantity' > 0).
JUUMRE BAŊŊE:
BAD_KEY - kle API mo alaa haala
Jaabu e mbaydi json:
{ "status": "error", "message": "*possible_answer*" } Jaabuuji baawɗi wonde e nder bannge "message": NO_ID_RENT - ID huurugol winndaaki INVALID_PHONE - limoore ndee alaa ko ma a njarii (ID jaraade moƴƴaani) STATUS_FINISH - jaraade heɓii te timmii STATUS_CANCEL - jaraade haɗaama e mbaydi kadi STATUS_WAIT_CODE - ina ƴeewtoo SMS gadano STATUS_REVOKE - Limoore ndee daɗnaama, kaalis maa artiraama
Parametruuji:
$api_key - Kle API
$id - ID huurugol keɓaangol e jaabawol so a orderii limoore
$status - kod ngam waylude darnde (limoore)
Darnde ndee waawi wonde:
JAABAWOL:
Jaabawol golle ngol wonat e mbaydi json:
{ "status": "success" }
JUUMRE BAŊŊE:
BAD_KEY - kle API mo alaa haala
Jaabu e mbaydi json:
{ "status": "error", "message": "*possible_answer*" }
Jaabuuji baawɗi wonde e nder bannge "message":
NO_ID_RENT - ID huurugol winndaaki
INCORECT_STATUS - darnde ŋakkiima walla siforaama no feewi
CANT_CANCEL - waawaa haɗde jaraade (waɗii minitiiji 20)
INVALID_PHONE - limoore ndee alaa ko ma a njarii (ID jaraade moƴƴaani)
ALREADY_FINISH - jaraade ndee timmiima kadi
ALREADY_CANCEL - jaraade ndee haɗaama kadi
SERVER_ERROR - jillondiral server
👉Yimre! Laawol ngol hollirta tan limoore 10 cakkitiiɗe. So aɗa yiɗi limoore ɓurɗe heewde, huutoro getRentStatus laawol ngam ƴeewtaade darndeeji.
Parametruuji:
$api_key - Kle API
JAABAWOL:
Jaabawol golle ngol wonat e mbaydi json:
{ "status": "success", "values": { "0": { "id": "12345", "phone": "79181234567" }, "1": { "id": "12345", "phone": "79181234568" } } }
JUUMRE BAŊŊE:
BAD_KEY - kle API mo alaa haala
BAD_ACTION - golle cuɓaaɗe ɗee njawaaki
Jaabu e mbaydi json:
{ "status": "error", "message": "*possible_answer*" }
Jaabuuji baawɗi wonde e nder bannge "message":
NO_NUMBERS - alaa limoore jarraaɗe
SERVER_ERROR - jillondiral server
Parametruuji:
$api_key - Kle API
$id - id jaraade
$rent_time- waktu jaraade (so tawii ko: waktuuji 4)
JAABAWOL:
Jaabawol golle ngol wonat e mbaydi json:
{ "status": "success", "phone": { "id": 1049, "endDate": "2020-01-31T12:01:52", "number": "79959707564"} }
So jaraade timmiinde ɓeydaama, nde newneta, ID hesere rokkaama
JUUMRE BAŊŊE:
BAD_KEY - kle API mo alaa haala
BAD_ACTION - golle cuɓaaɗe ɗee njawaaki
SERVER_ERROR - jillondiral server
Jaabu e mbaydi json:
{ "status": "error", "message": "*possible_answer*", "info": "*details*" }
Jaabuuji baawɗi wonde e nder bannge "message":
NO_ID_RENT - alaa ID jaraade
INVALID_TIME - waktu bonɗo. Waktuuji tawaaki gila 4 haa 1344
MAX_HOURS_EXCEED - Waktu ɓurngo heewde ɓurtinaama
ɓuri heewde - waktu ɓurngo heewde
INVALID_PHONE - ID jaraade bonɗo
RENT_DIE - rent o waawaa ɓeydeede sabu limngal ngal maayi
NO_BALANCE - kaalis heewaaɗo alaa
CHANNELS_LIMIT - konte o daaɓnaa
* ndee laawol ina tawee tan e nder rent gooto e operator MTT.
Parametruuji:
$api_key - Kle API
$id - id jaraade
$rent_time - waktu rent
JAABAWOL:
Jaabawol golle ngol wonat e mbaydi json:
{ "status": "success", "price": 6.33 }
JUUMRE BAŊŊE:
BAD_KEY - kle API mo alaa haala
BAD_ACTION - golle cuɓaaɗe ɗee njawaaki
SERVER_ERROR - jillondiral server
Jaabu e mbaydi json:
{ "status": "error", "message": "*possible_answer*" }
Jaabuuji baawɗi wonde e nder bannge "message":
NO_ID_RENT - alaa ID jaraade
INVALID_PHONE - ID jaraade bonɗo
INVALID_TIME - sahaa mo feewaani
RENT_DIE - rent o waawaa ɓeydeede sabu limngal ngal maayi
MAX_HOURS_EXCEED - Waktu ɓurngo heewde ɓurtinaama
ɓuri heewde - waktu ɓurngo heewde
CHANNELS_LIMIT - konte o daaɓnaa
API JAVA
Naatnu library e nder maven
<artifactId>SMSActivateApi</artifactId>
<version>1.0</version>
</dependecy>
Aɗa waawi yiide misaal binndol e ссылке на MavenRepository
Import class mawɗo ngam waɗde golle e API SMS-Activate.
Ngam huutoraade library, aɗa sokli API key, aɗa waawi heɓde ɗum e ndee hello e link les oo.
SMS-Activate API-KeyNgam heɓde balance gonɗo e konte maa, huutoro method getBalance... So aɗa njiiloo cashback ɓeydotooɗo e balance, ndeen noddu method getBalanceAndCashBack.
Laawol getBalanceAndCashBack ruttoo object classSMSActivateGetBalanceAndCashBack.
Parametruuji:
NONE
RETURN TYPE:
BigDecimal
Parametruuji:
NONE
RETURN TYPE:
Parametruuji:
countryId(Integer) - innde leydi.
service(String) - innde juutnde service.
forward*(boolean) - so aɗa njoddi limngal e forward call.
operatorSet*(Set) - set of operators.
phoneException*(Set) - excluding prefixes only for Russia, a set of numbers from 3 to 6 (7918,7900111).
* optional box. If nothing is specified, the default quantity will be given according to the setting in the profile.
RETURN TYPE:
Parametruuji:
countryId(Integer) - innde leydi.
operatorSet*(Set) - set of operators that are available for the service
RETURN TYPE:
Parametruuji:
id(Integer) - activation identifier
service(String) - innde juutnde service.
Instead of the activation identifier, you can pass the received class object SMSActivateActivation after using the method getNumber or one of the activations after use getMultiServiceNumber.
RETURN TYPE:
Parametruuji:
countryId(Integer) - innde leydi.
serviceMap(Set) - set of services which activation is purchased for
multiForwardList(List) - list of services with call forwarding available
operatorSet(Set) - set of operators.
RETURN TYPE:
Parametruuji:
NONE
RETURN TYPE:
Parametruuji:
countryId(Integer) - innde leydi.
service(String) - innde juutnde service.
RETURN TYPE:
Parametruuji:
countryId(Integer) - innde leydi.
RETURN TYPE:
Parametruuji:
activationId(Integer) - activation identifier
Instead of the activation identifier, you can pass the received class object SMSActivateActivation after using the method getNumber or one of the activations after use getMultiServiceNumber.
RETURN TYPE:
Parametruuji:
id(Integer) - activation identifier
status(SMSActivateClientStatus) - the status that is to be set for activation
Instead of the activation identifier, you can pass the received class object SMSActivateActivation after using the method getNumber or one of the activations after use getMultiServiceNumber.
RETURN TYPE:
Parametruuji:
NONE
RETURN TYPE:
Parametruuji:
activationId(Integer) - activation identifier
Instead of the activation identifier, you can pass the received class object SMSActivateActivation after using the method getNumber or one of the activations after use getMultiServiceNumber.
RETURN TYPE:
Algorithm for receiving the full text of SMS with activation
Heɓde limoore rewrude e laawol getNumber, caggal ɗuum golle ɗee ina mbaawi:
CANCEL - 8 - Cancel the activation (if the number does not match you)
MESSAGE_WAS_SENT - Humpito wonde SMS o neldaa (Ina waɗi heɓde binndi timmuɗi SMS)
Caggal nde a waɗii sifaa MESSAGE_WAS_SENT, waylu variable ngam heɓde SMS e kuutorgol laawol waitSMS e parametiruuji aktivasiyoŋ e waktu ƴettugol SMS.
Caggal heɓde SMS, a waawi heɓde ɗum e kuutorgol laawol getFullSMS caggal ɗuum hollita binndi timmuɗi e kuutorgol laawol getText().
Caggal ɗuum, a waawi waɗde aktivasiyoŋ ɗee e sifaaji garooji ɗii:
Ngam aktivasiyoŋ e sifa MESSAGE_WAS_SENT:
CANCEL - Haɗu aktivasiyoŋ
Caggal heɓde kod oo sahaa fof:
REQUEST_ONE_MORE_CODE - Ƴeewto goɗɗo SMS
FINISH - Tabitina kod SMS te timmin aktivasiyoŋ
Ngam aktivasiyoŋ e sifa REQUEST_ONE_MORE_CODE:
FINISH - Tabitina kod SMS te timmin aktivasiyoŋ
Parametruuji:
countryId(Integer) - innde leydi.
service(String) - innde juutnde service.
hours(Integer)* - waktu luggiingol
operator(String)* - innde operator mobile
urlWebhook(String)* - link webhook (Wonaa hiisaade e default)
Hol ko woni webHook?* parametir optional. So tawii alaa sifaa, default o wonay
RETURN TYPE:
Parametruuji:
countryId(Integer) - innde leydi.
operatorSet(Set) - set operatoruuji mobile
hours(Integer)* - waktu luggiingol
* parametir optional. So tawii alaa sifaa, default o wonay
RETURN TYPE:
Parametruuji:
rentId(Integer) - identifier limngal lugginaangal
E dow rentId, a waawi jippinde object class heɓaaɗo SMSActivateRentActivation after using the method getRentNumber
RETURN TYPE:
Email API
Sifaa API statuses
3 - Jaaborgol
4 - Haɗugol
5 - Njaɓaama
DESCRIPTION:
Jokkondiral ɓurngal tiiɗde e ɗaɗɗe REST API e ɓeydagol limre mailbox gmail.com ngam winnditagol konte Telegram.
Parametruuji:
$api_key - Kle API
$site- Gite mo aɗa yiɗi email ngam
JAABAWOL:
Jaabawol golle ɗee wonat e mbaydi json, yeru:
{
"status":"OK",
"response":{
"zones":[
{
"name":"info",
"cost":2.5
},
...
],
"popular":[
{
"name":"mail.ru",
"cost":6,
"count":159008
},
...
]
}
}
JUUMRE BAŊŊE:
BAD_SITE- Gite ndee sifaaka
BAD_KEY - kle API mo alaa haala
BAD_ACTION - golle cuɓaaɗe ɗee njawaaki
Parametruuji:
$api_key - Kle API
$site - gite mo aɗa yiɗi email ngam
$mail_type - sifa mail: domain walla zone keewɗe (1 - zone 2 - keewɗe)
$mail_domain - wuro walla domain suɓaaɗo
JAABAWOL:
Jaabawol golle ɗee wonat e mbaydi json, yeru:
{
"status":"OK",
"response":{"email":"[email protected]","id":241}
}
JUUMRE BAŊŊE:
BAD_KEY - kle API mo alaa haala
BAD_ACTION - golle cuɓaaɗe ɗee njawaaki
MAIL_TYPE_ERROR - alaa domain nii e nokku oo siforaa
CHANNELS_LIMIT - konte o daaɓnaa
Parametruuji:
$api_key - Kle API
$id- Id imel mo dartingol ngol haani
JAABAWOL:
Jaabawol golle ɗee wonat e mbaydi json, yeru:
{
"status": "OK",
"response": {
"email": "[email protected]",
"id": 360
}
}
JUUMRE BAŊŊE:
BAD_KEY - kle API mo alaa haala
BAD_ACTION - golle cuɓaaɗe ɗee njawaaki
BLOCKED_SITE - lowre daaƴaande
BAD_BALANCE - kaalis heewaaɗo alaa
ACTIVATION_NOT_FOUND - aktivasiyoŋ heɓaaka
CHANNELS_LIMIT - konte o daaɓnaa
Parametruuji:
$api_key - Kle API
$page- limoore hello
$per_page- limoore ceergu kala e hello
$search- bar ƴeewndo
$sort- laawol peccagol. (desc, asc)
JAABAWOL:
Jaabawol golle ɗee wonat e mbaydi json, yeru:
{
"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
}
}
Parametruuji:
$api_key - Kle API
$id- id ceergu
JAABAWOL:
Jaabawol golle ɗee wonat e mbaydi json, yeru:
{
"status":"OK",
"response":true
}
JUUMRE BAŊŊE:
EARLY_CANCEL_DENIED - A waawaa haɗde imel e nder minitiiji 2 gadani.
Parametruuji:
$api_key - Kle API
$id- ID imel moƴƴinaaɗo, o ruttee ko caggal nde a njiilii imel
JAABAWOL:
Jaabawol golle ɗee wonat e mbaydi json, yeru:
{
"status":"OK",
"response":{
"value":"Содержания письма"
}
}
Porogaraam API Partner
Parametruuji:
$api_key - Kle API
$id- ID softuweer mo a foti heɓde
JAABAWOL:
Jaabawol golle ɗee wonat e mbaydi json, yeru:
{
"status": "success",
"key": "F5qrzFoY6afj3zrEq7SeMplbx",
"manual": "Software download link:"
}
JUUMRE BAŊŊE:
KEEROL_MOƊƊOL - ID feewaani walla ID wonaa limoore
BAD_ACTION - golle ɗe njaɓataa walla reseller o tawtaake.
<?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.mom 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





















































