Quick note for something
recently worked on with Zoom Contact Centre and using APIs
ClickSend
Using ClickSend to send SMS message via a "Script"
widget in Zoom:
+++++++++++++++++++++++++++++++++
async function main () {
const username = "USERNAME";
const apiKey = "API KEY";
// ClickSend SMS API URL
var url = "https://rest.clicksend.com/v3/sms/send";
//var url = "https://rest.clicksend.com/v3/account";
// Create Basic Auth header
var auth = btoa(username + ":" + apiKey);
// Headers
const headers = {
"Authorization": "Basic " + auth,
"Content-Type": "application/json"
};
//var response = await req.get(url, {headers});
//return response.data
// SMS payload
const body = {
messages: [
{
source: "NAME",
from: "NAME",
to: "E.164
Format Number",
body: "This is the message to be sent."
}
]
};
// Send SMS via ClickSend
var response = await req.post(url, body, { headers });
}