Snippets

Team Zoom PHP - send using URL parameters and file_get_contents

Created by Terence Foxcroft last modified Curtis Sahd
<?php

$credentials = "YOUR_EMAIL_ADDRESS:YOUR_API_TOKEN";

$url = "https://www.zoomconnect.com/app/api/rest/v1/sms/send-url-parameters?recipientNumber=27821234567&message=Test%20message";

$result = file_get_contents($url, null, stream_context_create(array(
    'http' => array(
        'method'           => 'POST',
        'header'           => "Content-type: application/json\r\n".
                              "Connection: close\r\n" .
                              "Authorization: Basic " . base64_encode($credentials)
    ),
)));

if ($result) {
    echo 'Message id: ' . $result;
} else {
    echo "POST failed";
}

?>

Comments (0)

HTTPS SSH

You can clone a snippet to your computer for local editing. Learn more.