Document API
1. Lấy danh sách số phone:
URL API: https://verificationotp.com/wp-json/sms/v2/sim
Sử dụng phương thức POST
1.1 Sử dụng cURL
curl --location 'https://verificationotp.com/wp-json/sms/v2/sim' \ --header 'Content-Type: application/json' \ --data '[ { "phone": "0972765119", "index": 0, "device":"string" }, { "phone": "098877766", "index": 1, "device":"string" } ]'
1.2 Sử dụng PHP
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://verificationotp.com/wp-json/sms/v2/sim',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS =>'[
{
"phone": "0972765119",
"index": 0,
"device":"Goole"
},
{
"phone": "098877766",
"index": 1,
"device":"Facebook"
}
]',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
2. Đẩy data sms cho số phone:
URL API: https://verificationotp.com/wp-json/sms/v2/phone/07493743847
Sử dụng phương thức POST
2.1 Sử dụng cURL
curl --location 'https://verificationotp.com/wp-json/sms/v2/phone/07493743847' \ --header 'Content-Type: application/json' \ --data '{ "phone": "07493743847", "code":"06552", "from":"Facebook", "sms":"nội dung tin nhắn", "time":"03/08/2023 19:45:00", "isCall": false, "type": 1 }'
2.2 Sử dụng PHP
$curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => 'https://verificationotp.com/wp-json/sms/v2/phone/07493743847', CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => '', CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => 'POST', CURLOPT_POSTFIELDS =>'{ "phone": "07493743847", "code":"06552", "from":"Facebook", "sms":"nội dung tin nhắn", "time":"03/08/2023 19:45:00", "isCall": false, "type": 1 }', CURLOPT_HTTPHEADER => array( 'Content-Type: application/json' ), )); $response = curl_exec($curl);
3. Disconnect số phone:
URL API: https://verificationotp.com/wp-json/sms/v2/disconnect
Sử dụng phương thức POST
3.1 Sử dụng cURL
curl --location 'https://verificationotp.com/wp-json/sms/v2/disconnect' \ --header 'Content-Type: application/json' \ --data '{ "message": [ "09776655", "0983827648" ] }'
3.2 Sử dụng PHP
$curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => 'https://verificationotp.com/wp-json/sms/v2/disconnect', CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => '', CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => 'POST', CURLOPT_POSTFIELDS =>'{ "message": [ "09776655", "0983827648" ] }', CURLOPT_HTTPHEADER => array( 'Content-Type: application/json' ), )); $response = curl_exec($curl); curl_close($curl); echo $response;