VOICE API EN PHP
<?php
$url = "https://macsmspro.com/api/voice_v2";
$fields = array(
"from" => "xxxxxxxx", // Caller phone number (verified phone number)
"phone" => "xxxxxxx", // recipient phone
"message" => "Bonjour, il est l'heure pour la réunion", // message
"token" => "xxxxxx", // API token
"language" => "fr-FR"
);
$curl_options = array(
CURLOPT_URL => $url,
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => http_build_query( $fields ),
CURLOPT_HTTP_VERSION => 1.0,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HEADER => false
);
$curl = curl_init();
curl_setopt_array( $curl, $curl_options );
$result = curl_exec( $curl );
curl_close( $curl );
$response = json_decode($result);
var_dump($response);
?>Last updated