v3 SMS-offnettoets

Beskrywing:

Stuur ’n toets-sms-boodskap aan nommer


URI:

https://api.multitel.net/v3/offnet/sms

Parameters:

Required: 
number -  your SMS enabled phone number 

Optional:
notify_url - if provided, we will post back any status changes to this URL. (example: https://customer-crm.xyz/notify-handler )

Metodes:

POST


Voorbeelduitvoer:

{
  "status":
    {
      "code":"200",
      "msg":"Success"
    },
  "response":""
  }

Voorbeeldkode:


<?
$curl = curl_init();
  curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api.multitel.net/v3/offnet/sms',
  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 =>'{
    "number":"15203861195",
    "notify_url":"https://customer-crm.xyz/notify-handler"
}',
  CURLOPT_HTTPHEADER => array(
    'Authorization: Basic d2ViZGV2b3BzOmNvbm51b243Nw==',
    'Content-Type: application/json'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
?>

Soek dokumentasie