Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the wordpress-seo domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/veribcyo/public_html/wp-includes/functions.php on line 6114
Document API - Receive SMS Skip to main content

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;