Requests Phone number rent History Refill account Settings API / Partnership FAQ / Contacts
API documentation

Partnership program for developers



We provide 2 API gateways for your choice:
API #1: 100% identical API sms-area/sms-activate API #2: 100% identical API sms-reg

You can use with GetSMS.ONLINE any software which work with sms-area/sms-activate/sms-reg. You just need to modify one file:
    C:\Windows\System32\drivers\etc\hosts
Add to last line:
    88.99.25.161 service-domain.com
Where service-domain.com - website address of service which work with software.

Используйте домен smsactivateapi.getsms.online вместо api.getsms.online.

Пояснение:
Следует отметить что хоть API смсэрея и смс-активейт по большей части идентичны, между ними все же есть отличия.
Например разный ответ сервера при отсутствии денег на счету (NO_MEANS и NO_BALANCE) или разный ответ при отсутствии номера с заданными пользователем параметрами (NO_NUMBER и NO_NUMBERS) разница всего в одну букву может вызывать некорректную работа программного обеспечения так что мы создали 2 отельных домена под API, если вы будете обращаться к API по стандартному домену (api.getsms.online) то вышеуказанные ответы будут как на смсэрея(NO_MEANS и NO_NUMBER соответственно), а если по домену smsactivateapi.getsms.online то ответы будут в формате смсактивейт(NO_BALANCE и NO_NUMBERS соответственно).



API #1


URL for requests: http://api.getsms.online/stubs/handler_api.php
Requests type: POST or GET
Requests interval: not more 50 requests per second from 1 IP, also results like NO_NUMBERS work with cache(30seconds)


Example: http://api.getsms.online/stubs/handler_api.php?api_key=123456789&action=getNumbersStatus

Parameters:
    api_key = YOUR_API_KEY
    action = getNumbersStatus

Possible answers:
    Answer:
        {"ot_0":70,"av_0":98,"av_1":98,"fb_0":98,"go_0":92,"ig_0":97,"ok_0":86,"tg_0":97,"tw_0":98,"vi_0":98,"vk_0":75,"wb_0":3,"wa_0":98}

    Errors:
        NO_KEY - API-key not specified
        NO_ACTION - API function not specified
        BAD_KEY - Wrong API-key
        BAD_ACTION - Wrong API function
        ERROR_SQL - Error of SQL-server

Example: http://api.getsms.online/stubs/handler_api.php?api_key=123456789&action=getBalance

Parameters:
    api_key = YOUR_API_KEY
    action = getBalance

Possible answers:
    Answer:
        ACCESS_BALANCE:100.00

    Errors:
        NO_KEY - API-key not specified
        NO_ACTION - API function not specified
        BAD_KEY - Wrong API-key
        BAD_ACTION - Wrong API function
        ERROR_SQL - Error of SQL-server

Example: http://api.getsms.online/stubs/handler_api.php?api_key=123456789&action=getNumberBalance&num=79251234567

Parameters:
    api_key = YOUR_API_KEY
    action = getBalance
    num = PHONE_NUMBER

Possible answers:
    Answer:
        NUM_BALANCE: 100.00

        OR

        ORDER_ACCEPTED - this message means what balance can't be showed immediately, but your order to get balance received by system and balance can be showed soon (from couple seconds to couple minutes), after get this message your software must do this API request again and again(example 1 time per 10 seconds) while not get message which not equals "ORDER_ACCEPTED".

    Errors:
        NO_KEY - API-key not specified
        NO_ACTION - API function not specified
        BAD_KEY - Wrong API-key
        BAD_ACTION - Wrong API function
        ERROR_SQL - Error of SQL-server
        WRONG_NUMBER - This number never used for Avito+Redirection from your account
        CANT_GET_BALANCE_FROM_THIS_NUMBER - Can not check balance of this number
        TEMPORARY_ERROR - Temporary error, cant check balance now, you can try again after 10 minutes

This function don't work with numbers which used for Avito+Redirection earlier than 22.10.2016!

Example: http://api.getsms.online/stubs/handler_api.php?api_key=123456789&action=getNumber&service=fb&country=ru

Parameters:
    api_key = YOUR_API_KEY
    action = getNumber
    country = COUNTRY_AND_PROVIDER
    service = SERVICE_WHICH_YOU_NEED
    forward = SETUP_FORWARDING_IF_NEEDED(0 - NO, 1 - YES) (only for Avito+Redirection)
    count = COUNT_OF_SMS

Country and provider:
    ru_beeline - Russia/Beeline
    ru_mts - Russia/MTS
    ru_megafon - Russia/Megafon
    ru_tele2 - Russia/Tele2
    ru - Russia/Any provider
    ua_beeline - Ukraine/Beeline
    ua_kyivstar - Ukraine/KievStar
    ua_djuice - Ukraine/djuice
    ua_mts - Ukraine/MTS
    ua_jeans - Ukraine/Jeans
    ua_life - Ukraine/Life :)
    ua - Ukraine/Any provider
    by - Belarussia/Any provider
    pl - Poland/Any provider
    uk - United Kingdom/Any provider
    de - Germany/Any provider
    or - Any country and any provider

Service:
    or/ot - Not in list
    kp - Tinkoff new
    vk - VK.com
    wb - WeChat
    ub - Uber
    we - AOL
    at/av - Avito
    fb - Facebook
    gm/go - Google
    ig - Instagram
    mm - Microsoft
    ok - OK.ru
    tg - Telegram
    tw - Twitter
    vr/vi - Viber
    yl - Youla
    wa - WhatsApp
    ya - Yandex
    mb - Yahoo

Possible answers:
    Answer:
        ACCESS_NUMBER:ORDER_ID_:PHONE_NUMBER

    Errors:
        NO_KEY - API-key not specified
        NO_ACTION - API function not specified
        BAD_KEY - Wrong API-key
        BAD_ACTION - Wrong API function
        ERROR_SQL - Error of SQL-server
        BAD_SERVICE - Wrong service
        BAD_COUNTRY - Wrong country
        NO_MEANS - Not enough funds
        NO_NUMBER - Not have phone numbers with requested parameters

Reminder - get repeat sms absolutely free. Example: after you once pay for sms from Facebook to phone number +79501231234 you can receive another sms from Facebook to same number (+79501231234) for free while we not change this sim card to another in our hardware. After sim card changed receiving sms to this number will not possible.

Example: http://api.getsms.online/stubs/handler_api.php?api_key=123456789&action=getRepeat&service=fb&number=79601230000

Parameters:
    api_key = YOUR_API_KEY
    action = getRepeat
    number = NUMBER_WHICH_YOU_NEED
    service = SERVICE_WHICH_YOU_NEED

Possible answers:
    Answer:
        ACCESS_NUMBER:ORDER_ID_:PHONE_NUMBER

    Errors:
        NO_KEY - API-key not specified
        NO_ACTION - API function not specified
        BAD_KEY - Wrong API-key
        BAD_ACTION - Wrong API function
        ERROR_SQL - Error of SQL-server
        BAD_SERVICE - Wrong service
        NO_MEANS - Not enough funds
        NO_NUMBER - Not have phone numbers with requested parameters
        DOUBLE_RETRY - To this number and service already ordered repeat, need to complete before order new repeat

Attention! Repeat for Avito+Redirection processed as just Avito.
Reminder - get repeat sms absolutely free. Example: after you once pay for sms from Facebook to phone number +79501231234 you can receive another sms from Facebook to same number (+79501231234) for free while we not change this sim card to another in our hardware. After sim card changed receiving sms to this number will not possible.

Example: http://api.getsms.online/stubs/handler_api.php?api_key=123456789&action=setStatus&id=123&status=1

Parameters:
    api_key = YOUR_API_KEY
    action = setStatus
    id = ORDER_ID
    status = STATUS_WHICH_NEED_TO_SET
    forward = RUSSIAN_PHONE_NUMBER_FOR_SETUP_FORWARDING_TO (necessarily only if you before send forward=1 to "getNumber" function)

List of pissible statuses:
For activation with status:
    0 [Waiting for ready(SMS sended)]:
        -1 = Cancel activation
        1 = Ready, SMS sended
        10 = Number already used in this service
    1 [Waiting for code]:
        -1 = Cancel activation
    2 [Code arrived, waiting for checking code by client]:
        6 = Code is correct. Activation successfuly finished.
        3 = Code is incorecct. Request code again.
    3 [Waiting for code again]:
        6 = Cancel "requested code again" status and finish activation
    5 [Waiting for resending SMS]:
        -1 = Cancel activation
        1 = Ready, SMS sended

Possible answers:
    Answer:
        ACCESS_CANCEL - Activation canceled
        ACCESS_ERROR_NUMBER_GET - Number marked as already used in requested service
        ACCESS_READY - System is informed what sms sended
        ACCESS_RETRY_GET - Elaboration successfyly requested
        ACCESS_ACTIVATION - Activation successfuly completed

    Errors:
        NO_KEY - API-key not specified
        NO_ACTION - API function not specified
        BAD_KEY - Wrong API-key
        BAD_ACTION - Wrong API function
        ERROR_SQL - Error of SQL-server
        BAD_STATUS - Wrong status
        NO_ACTIVATION - Wrong ID of activation

If ordered more 1 SMS to number when after setup status "6" [Activation successfuly finished] function will return new activation id(activation will createad automaticaly to same number). Answer same as you see before in "getNumber" function.

Reminder - get repeat sms absolutely free. Example: after you once pay for sms from Facebook to phone number +79501231234 you can receive another sms from Facebook to same number (+79501231234) for free while we not change this sim card to another in our hardware. After sim card changed receiving sms to this number will not possible.

Example: http://api.getsms.online/stubs/handler_api.php?api_key=123456789&action=getStatus&id=123

Parameters:
    api_key = YOUR_API_KEY
    action = getStatus
    id = ORDER_ID

Possible answers:
    Answer:
        ACCESS_CANCEL - Activation canceled
        STATUS_WAIT_READY - Waiting for ready(SMS sended)
        STATUS_WAIT_CODE - Waiting for code from SMS
        STATUS_OK:КОД_ИЗ_SMS - Code arrived, waiting for checking code by client
        STATUS_WAIT_RETRY - Waiting for code from SMS again
        STATUS_WAIT_RESEND - Waiting for resending SMS
        STATUS_ACCESS:КОД_ИЗ_SMS - Activation successfuly finished
        STATUS_ERROR_NUMBER - Problems with our phone number
        STATUS_ERROR - Unknown error

    Errors:
        NO_KEY - API-key not specified
        NO_ACTION - API function not specified
        BAD_KEY - Wrong API-key
        BAD_ACTION - Wrong API function
        ERROR_SQL - Error of SQL-server
        BAD_STATUS - Wrong status
        NO_ACTIVATION - Wrong ID of activation

Number will added to your own blacklist when you mark it as "already used"(status: 10), also when you not receive sms to number 20 minutes.

Example: http://api.getsms.online/stubs/handler_api.php?api_key=123456789&action=cleanblacklist

Parameters:
    api_key = YOUR_API_KEY
    action = getBalance

Possible answers:
    Answer:
        OK

    Errors:
        NO_KEY - API-key not specified
        NO_ACTION - API function not specified
        BAD_KEY - Wrong API-key
        BAD_ACTION - Wrong API function
        ERROR_SQL - Error of SQL-server

1. Get phone number for your activation by using "getNumber" API function
2. Use number for activate profile in some service and setup activation status to 1 by using "setStatus" API function
3. Wait for when SMS will arrived by calling "getStatus" API function
4. Use code from sms to activate yours profile in some service and setup activation status to 6 by using "setStatus" API function


API #2


URL for requests: http://api.getsms.online/METHOD_NAME.php
Requests type: POST or GET
Requests interval: not more 50 requests per second from 1 IP, also results like NO_NUMBERS work with cache(30seconds)


METHOD_NAME = getBalance

Parameters:
    apikey = YOUR_API_KEY

Possible answers:
    Answer:
        {"response":"1","balance":"SUM"} where:
            1 - means successfuly result
            SUM = account balance.

    Errors:
        {"response":"ERROR","error_msg":"MESSAGE"} where:
            MESSAGE = erors description, may contain:
                ERROR_NO_KEY - API-key not specified
                ERROR_WRONG_KEY - Wrong API-key

METHOD_NAME = getNum

Parameters:
    apikey = YOUR_API_KEY
    country = Country
        Possible contain:
            ru_beeline - Russia/Beeline
            ru_mts - Russia/MTS
            ru_megafon - Russia/Megafon
            ru_tele2 - Russia/Tele2
            ru - Russia/Any provider
            ua_beeline - Ukraine/Beeline
            ua_kyivstar - Ukraine/Киевстар
            ua_djuice - Ukraine/djuice
            ua_mts - Ukraine/MTS
            ua_jeans - Ukraine/Jeans
            ua_life - Ukraine/Life :)
            ua - Ukraine/Any provider
            by - Belarussia/Any provider
            pl - Poland/Any provider
            uk - United Kingdom/Any provider
            de - Germany/Any provider
            all - Any provider
    service = Service when you need activation
        Possible contain:
            other - Not in list
            kp - Tinkoff new
            vk - VK.com
            wb - WeChat
            ub - Uber
            we - AOL
            avito - Avito
            facebook - Facebook
            gmail - Google
            instagram - Instagram
            mm - Microsoft
            classmates - OK.ru
            telegram - Telegram
            twitter - Twitter
            Viber - Viber
            yl - Youla
            whatsapp - WhatsApp
            ya - Yandex
            mb - Yahoo

Possible answers:
    Answer:
        {"response":"1","tzid":"TZID"} where:
            1 - means successfuly result
            TZID = id of operation.

    Errors:
        {"response":"ERROR","error_msg":"MESSAGE"} where:
            MESSAGE = erors description, may contain:
                ERROR_NO_KEY - API-key not specified
                ERROR_WRONG_KEY - Wrong API-key
                WARNING_LOW_BALANCE - not enough funds
                Service not define - service not specified
                %mn% to this TZID not applicable - method %mn% to this TZID not acceptable
                There is no TZID value - TZID not specified or wrong
                There is no %param% value - %param% value not specified

METHOD_NAME = setReady

Parameters:
    apikey = YOUR_API_KEY
    tzid = operation id

Possible answers:
    Answer:
        {"response":"1"} where:
            1 - means successfuly result

    Errors:
        {"response":"ERROR","error_msg":"MESSAGE"} where:
            MESSAGE = erors description, may contain:
                ERROR_NO_KEY - API-key not specified
                ERROR_WRONG_KEY - Wrong API-key

METHOD_NAME = getState

Parameters:
    apikey = YOUR_API_KEY
    tzid = operation id

Possible answers:
    Answer:
        {"response":"RESPONSE","service":"SERVICE","number":"NUMBER","msg":"ANSWER"} where:
            NUMBER — phone number, ANSWER — code from sms, SERVICE — service, values same as in method "getNum"
            RESPONSE can contain:
                TZ_NUM_PREPARE — number assigned, need to send sms and run method "SetReady"
                TZ_NUM_WAIT — waiting for sms
                TZ_NUM_ANSWER — sms arrived
                TZ_NUM_WAIT2 — waiting sms again
                WARNING_NO_NUMS — for now no have numbers with parameters which you need
                TZ_OVER_OK — operation is complete
                TZ_OVER_EMPTY — sms not arrived or you not run method "setReady"

    Errors:
        {"response":"ERROR","error_msg":"MESSAGE"} where:
            MESSAGE = erors description, may contain:
                ERROR_NO_KEY - API-key not specified
                ERROR_WRONG_KEY - Wrong API-key
                There is no TZID value - TZID not specified or wrong

METHOD_NAME = setOperationOk

Parameters:
    apikey = YOUR_API_KEY
    tzid = operation id

Possible answers:
    Answer:
        {"response":"1","tzid":"TZID"} where:
            1 - means successfuly result
            TZID = operation id.

    Errors:
        {"response":"ERROR","error_msg":"MESSAGE"} where:
            MESSAGE = erors description, may contain:
                ERROR_NO_KEY - API-key not specified
                ERROR_WRONG_KEY - Wrong API-key
                There is no TZID value - TZID not specified or wrong

METHOD_NAME = setOperationRevise

Parameters:
    apikey = YOUR_API_KEY
    tzid = operation id

Possible answers:
    Answer:
        {"response":"1","tzid":"TZID"} where:
            1 - means successfuly result
            TZID = operation id.

    Errors:
        {"response":"ERROR","error_msg":"MESSAGE"} where:
            MESSAGE = erors description, may contain:
                ERROR_NO_KEY - API-key not specified
                ERROR_WRONG_KEY - Wrong API-key
                There is no TZID value - TZID not specified or wrong

METHOD_NAME = getNumRepeat

Parameters:
    apikey = YOUR_API_KEY
    tzid = operation id по которой требуется повтор.

Possible answers:
    Answer:
        {"response":"RESPONSE","tzid":"NEWTZID"} where:
            1 - means successfuly result
            NEWTZID = id of new operation.
            RESPONSE can contain:
                0 — reply operation cannot be created;
                1 — success;
                3 — Number busy now. Please try later.

    Errors:
        {"response":"ERROR","error_msg":"MESSAGE"} where:
            MESSAGE = erors description, may contain:
                ERROR_NO_KEY - API-key not specified
                ERROR_WRONG_KEY - Wrong API-key
                There is no TZID value - TZID not specified or wrong

METHOD_NAME = setOperationUsed

Parameters:
    apikey = YOUR_API_KEY
    tzid = operation id

Possible answers:
    Answer:
        {"response":"1","tzid":"TZID"} where:
            1 - means successfuly result
            TZID = operation id.

    Errors:
        {"response":"ERROR","error_msg":"MESSAGE"} where:
            MESSAGE = erors description, may contain:
                ERROR_NO_KEY - API-key not specified
                ERROR_WRONG_KEY - Wrong API-key
                There is no TZID value - TZID not specified or wrong