GetAlts API
@Lor3mDomain - http://getalts.club/api/
All requests must contain valid API-token.
(!) - request must contain this parameter.
All responses are sent in JSON-form.
Only GET-requests allowed.
Your personal API-Token can be obtained in "API"-tab of @GetAltsBot
LIST OF SUPPORTED SERVICES (LINK)
LIST OF SUPPORTED COUNTRIES (LINK)
LIST OF SUPPORTED STATUSES + EXAMPLE (LINK)
Get current balance
http://getalts.club/api/get_balance?token=$token
Parameters:
$token - (!) your API-token
Errors:
NO_TOKEN - no token provided
BAD_TOKEN - invalid token provided
Returns:
Current balance in $USD.
Example request:
http://getalts.club/api/get_balance?token=my_api_token
Example response:
{"balance": 32.0}
Get amount of available numbers
http://getalts.club/api/get_amount?token=$token&country=$country
Parameters:
$token - (!) your API-token
$country - wished country (Russia by default)
Errors:
NO_TOKEN - no token provided
BAD_TOKEN - invalid token provided
BAD_COUNTRY - invalid country short provided
Returns:
List of services and amount of available numbers for each of them (all this for a chosen country).
Example request:
http://getalts.club/api/get_amount?token=my_api_token&country=de
Example response:
{"tg": 261, "vk": 1187, "yt": 680, "fb": 1090, "gm": 680, "go": 680, "ig": 842, "lm": 1828, "ln": 1792, "ms": 375, "st": 1727, "ti": 602, "tw": 1456, "ub": 1774, "wc": 1301, "wp": 969, "yh": 604, "ya": 1098, "ot": 822}
Get prices by country
http://getalts.club/api/get_prices_by_country?token=$token&country=$country
Parameters:
$token - (!) your API-token
$country - (!) wished country
Errors:
NO_TOKEN - no token provided
BAD_TOKEN - invalid token provided
NO_COUNTRY - no country provided
BAD_COUNTRY - invalid country short provided
Returns:
List of services and their prices in $USD cents for a chosen country.
Example request:
http://getalts.club/api/get_prices_by_country&token=my_api_token&country=us
Example response:
{"vk": 8, "tg": 66, "yt": 66, "fb": 8, "ig": 66, "lm": 8, "ln": 8, "ms": 8, "st": 8, "ti": 66, "tw": 8, "ub": 8, "wc": 8, "wp": 66, "yh": 8, "ya": 8, "ot": 8}
Get prices by service
http://getalts.club/api/get_prices_by_service?token=$token&service=$service
Parameters:
$token - (!) your API-token
$service- (!) wished service
Errors:
NO_TOKEN - no token provided
BAD_TOKEN - invalid token provided
NO_SERVICE - no service provided
BAD_SERVICE - invalid service short provided
Returns:
List of countries and prices for a chosen service in $USD cents.
Example request:
http://getalts.club/api/get_prices_by_service?token=my_api_token&service=tg
Example response:
{"ru": 18, "kz": 18, "ua": 26, "ro": 20, "pl": 22, "kg": 20, "cn": 18, "uk": 26, "ng": 42, "ee": 22, "my": 30, "de": 110, "id": 30, "ph": 26, "mm": 32, "vn": 26, "us": 66, "il": 64, "hk": 30, "mg": 26, "cg": 26, "mo": 48, "eg": 52, "ie": 26, "kh": 24, "la": 38, "ht": 46, "ci": 46, "gm": 90, "rs": 90, "ye": 90, "za": 34, "az": 90, "ca": 54, "ma": 34, "gh": 38, "ar": 42, "uz": 90, "cm": 52, "tg": 52, "lt": 30, "hr": 30, "iq": 52, "nl": 30}
Buy number
http://getalts.club/api/buy_number?token=$token&service=$service&country=$country
Parameters:
$token - (!) your API-token
$service- (!) wished service
$country - wished country (Russia by default)
Errors:
NO_TOKEN - no token provided
BAD_TOKEN - invalid token provided
NO_SERVICE - no service provided
BAD_SERVICE - invalid service short provided
BAD_COUNTRY - invalid country short provided
LOW_BALANCE - not enough balance to buy this number
NO_NUMBERS - no available numbers for this country and service
Returns:
Activation ID, phone number and current activation status.
Example request:
http://getalts.club/api/buy_number?token=my_api_token&service=tg&country=ru
Example response:
{"activation_id": 1002450368, "phone_number": "79469268911", "status": "READY"}
Get activation status
http://getalts.club/api/get_activation_status?token=$token&activation_id=$activation_id
Parameters:
$token - (!) your API-token
$activation_id - (!) activation ID received after buying number
Errors:
NO_TOKEN - no token provided
BAD_TOKEN - invalid token provided
NO_ACTIVATION_ID - no activation ID provided
BAD_ACTIVATION_ID - invalid activation ID provided
Returns:
Current status of activation and code from SMS (if already received).
Example request:
http://getalts.club/api/get_activation_status?token=my-api_token&activation_id=1002450368
Example response:
{"status": "STATUS_WAIT_CODE", "code": null}
Set activation status
Parameters:
$token - (!) your API-token
$activation_id - (!) activation ID received after buying number
$status - (!) new status of activation
Errors:
NO_TOKEN - no token provided
BAD_TOKEN - invalid token provided
NO_ACTIVATION_ID - no activation ID provided
BAD_ACTIVATION_ID - invalid activation ID provided
NO_STATUS - no status provided
BAD_STATUS - invalid status provided
FAIL_STATUS_UPDATE - an error occured while updating activation status - happens, when trying to set wrong consequence of statuses
Returns:
Sets new status and returns current updated status of activation.
Example request:
Example response:
{"status": "ACCESS_READY"}