API sewa
API adalah protokol untuk komunikasi antara perangkat lunak anda dan server penyewaan nomor kami.
Deskripsi protokol API
Semua request harus ditujukan ke https://api.sms-man.com/rent-api/ melalui GET request. Semua request harus menggunakan kunci token API sebagai parameter token Semua jawaban dalam format json.
Permintaan saldo
Parameter
Parameter | Jenis | Dibutuhkan | Nilai |
|---|---|---|---|
token | String | Ya | Kunci API Anda |
Hasil
{
"balance": "799.70"
}Kesalahan yang mungkin terjadi
{
"success": false,
"error_code": "wrong_token",
"error_msg": {"token":"Wrong token!"}
}Dapatkan batas
Parameter
Parameter | Jenis | Dibutuhkan | Nilai |
|---|---|---|---|
token | String | Ya | Kunci API Anda |
country_id | Integer | Ya | |
type | String | Ya | hour / day / week / month |
time | String | Ya | Waktu sewa |
Hasil
{
"type": "hour",
"time": "4",
"limits": [
{"country_id":"1","count":"127","cost":"151.68"},
{"country_id":"2","count":"49","cost":"113.56"},
{"country_id":"4","count":"0","cost":"151.68"}
]
}Kesalahan yang mungkin terjadi
{
"success": false,
"error_code": "wrong_token",
"error_msg": {"token":"Wrong token!"}
}Pemesanan nomor untuk disewa
Parameter
Parameter | Jenis | Dibutuhkan | Nilai |
|---|---|---|---|
token | String | Ya | Kunci API Anda |
country_id | Integer | Ya | |
type | String | Ya | hour / day / week / month |
time | String | Ya | Waktu sewa |
Hasil
{
"request_id": 1,
"country_id": 1,
"number": "79002415539"
}Kesalahan yang mungkin terjadi
{
"success": false,
"error_code": "wrong_token",
"error_msg": {"token":"Wrong token!"}
}Memesan nomor parsial untuk disewa
Parameter
Parameter | Jenis | Dibutuhkan | Nilai |
|---|---|---|---|
token | String | Ya | Kunci API Anda |
country_id | Integer | Ya | |
application_id | Integer | Ya | |
type | String | Ya | hour / day / week / month |
time | String | Ya | Waktu sewa |
Hasil
{
"request_id": 1,
"country_id": 1,
"application_id": 1,
"number": "79002415539"
}Kesalahan yang mungkin terjadi
{
"success": false,
"error_code": "wrong_token",
"error_msg": {"token":"Wrong token!"}
}Ubah status
Parameter
Parameter | Jenis | Dibutuhkan | Nilai |
|---|---|---|---|
token | String | Ya | Kunci API Anda |
request_id | Integer | Ya | ID Permintaan |
status | String | Ya | close - mengakhiri penyewaan |
Hasil
{
"request_id": 1,
"success": true
}Kesalahan yang mungkin terjadi
{
"success": false,
"error_code": "wrong_token",
"error_msg": {"token":"Wrong token!"}
}Terima pesan sms terakhir
Parameter
Parameter | Jenis | Dibutuhkan | Nilai |
|---|---|---|---|
token | String | Ya | Kunci API Anda |
request_id | Integer | Ya | ID Permintaan |
Hasil
{
"request_id": "10",
"country_id": 1,
"number": "79633002801",
"sms": {"message":"message","code":"code","time":"2020-12-12 14:50:31"}
}Kesalahan yang mungkin terjadi
{
"success": false,
"error_code": "wrong_token",
"error_msg": {"token":"Wrong token!"}
}Menerima semua sms
Parameter
Parameter | Jenis | Dibutuhkan | Nilai |
|---|---|---|---|
token | String | Ya | Kunci API Anda |
request_id | Integer | Ya | ID Permintaan |
Hasil
{
"request_id": "10",
"country_id": 1,
"number": "79633002801",
"sms": [
{"message":"message","code":"code","time":"2020-12-12 14:50:31"}
]
}Kesalahan yang mungkin terjadi
{
"success": false,
"error_code": "wrong_token",
"error_msg": {"token":"Wrong token!"}
}Dapatkan daftar semua nomor
Parameter
Parameter | Jenis | Dibutuhkan | Nilai |
|---|---|---|---|
token | String | Ya | Your API KEY |
Hasil
[
{"id":1,"country_id":1,"number":"79002415539","status":"cancel"}
]Kesalahan yang mungkin terjadi
{
"success": false,
"error_code": "wrong_token",
"error_msg": {"token":"Wrong token!"}
}