Online API - Send a Message

Sending Messages

In this guide, we'll explore how you can use the Cloud Alert Online API to send messages.


Message Parameters
/**
Replace the below values with
the username and password of your registered account on Cloud Alert website */	
String username = "info@example.com";
String password = "xxxxxx";

/**
Replace the below value with the zone id value which you can find in your profile
when you login to your online Cloud Alert account.*/				
String zone = "zone2";
				
/**
The name of the identity that the you have created 
within your online Cloud Alert account.*/				
String identity = "ChronusLtd";		

/**
Indicates whether a delivery report is required for the sent message. 
The recommended values are 't'(True)/'f'(False). */
String requestReceipt = "t"; 		

/**
The name of the recipient. This field is useful if names of recipients
are to be stored in your Sent Messages for your future reference.*/
String recipientName = "Sandra James";

/**
The destination phone number of the recipient (including the country code).
The phone number should be numeric, 
and not include any leading '0's or '+'symbols.*/
String recipientPhoneNo = "17606535300";		

/** 
This is the message content that will be delivered to the recipient's handset*/
String msgContent = "Thanks for signing up.";

/**
This indicates that the response of the POST would be in pipe-delimited format
(Pipe Separated Values) */
String outputType = "PSV";
		
/** 
This indicates the category of the message: Alert, Promotion or Notification
Valid message category values for each category:
	Alerts: alert, alerts, alerting, a, 1
	Promotions: promo, promotion, promotions, promotional, p, 2
	Notifications: notif, notification, notifications, notificational, n, 4		
*/
String msgCategory = "alert";


//post the data
doAPIPost(username
		  , password
		  , identity
		  , requestReceipt
		  , recipientName
		  , recipientPhoneNo
		  , msgContent
		  , outputType
		  , msgCategory
		  , zone);		
		  		
/**
Replace the below values with
the username and password of your registered account on Cloud Alert website */	
$username = "info@example.com";
$password = "xxxxxx";

/**
Replace the below value with the zone id value which you can find in your profile
when you login to your online Cloud Alert account*/				
$zone = "zone2";

/**
The name of the identity that the you have created 
within your online Cloud Alert account.*/									
$identity = "Chronus Ltd";

/**
Indicates whether a delivery report is required for the sent message. 
The recommended values are 't'(True)/'f'(False). */
$requestReceipt = "t"; 	

/**
The name of the recipient. Optional. This field is useful if names of recipients
are to be stored in your Sent Messages for your future reference.*/
$recipientName = "Sandra James";

/**
The destination phone number of the recipient (including the country code).
The phone number should be numeric, 
and not include any leading '0's or '+'symbols.*/
$recipientPhoneNo = "17606535300";	

/** 
This is the message content that will be delivered to the recipient's handset*/
$msgContent = "Thanks for signing up";

/**
This indicates that the response of the POST would be in the format NAME:VALUE*/
$outputType = "NV";
	
/** 
This indicates the category of the message: Alert, Promotion or Notification
Valid message category values for each category:
	Alerts: alert, alerts, alerting, a, 1
	Promotions: promo, promotion, promotions, promotional, p, 2
	Notifications: notif, notification, notifications, notificational, n, 4		
*/
$msgCategory = "notif";

/**
For curl to communicate with the API over SSL, it requires a file containing
the certificates of Certificate Authorities (CAs).
The file can be downloaded from: https://curl.haxx.se/ca/cacert.pem 
Replace the below value with the path where you have stored the file on your disk
*/
$curlCAinfo = "C:\curlcainfo\cacert.pem";


//post the data
doAPIPost($username
		  , $password
		  , $identity
		  , $requestReceipt
		  , $recipientName
		  , $recipientPhoneNo
		  , $msgContent
		  , $outputType
		  , $msgCategory
		  , $zone
		  , $curlCAinfo);	
		
/**
Replace the below values with
the username and password of your registered account on Cloud Alert website */	
string username = "info@example.com";
string password = "xxxxxx";

/**
Replace the below value with the zone id value which you can find in your profile
when you login to your online Cloud Alert account.*/
string zone = "zone2";
				
/**
The name of the identity that the you have created 
within your online Cloud Alert account.*/		
string identity = "Chronus Ltd";			

/**
Indicates whether a delivery report is required for the sent message. 
The recommended values are 't'(True)/'f'(False). */
string requestReceipt = "t"; 

/**
The name of the recipient. This field is useful if names of recipients
are to be stored in your Sent Messages for your future reference.*/
string recipientName = "Sandra James";

/**
The destination phone number of the recipient (including the country code).
The phone number should be numeric, 
and not include any leading '0's or '+'symbols.*/
string recipientPhoneNo = "17606535300";			

/** 
This is the message content that will be delivered to the recipient's handset*/
string msgContent = "Thanks for signing up.";

/**
This indicates that the response of the POST would be in pipe-delimited format
(Pipe Separated Values) */
string outputType = "PSV";			

/** 
This indicates the category of the message: Alert, Promotion or Notification
Valid message category values for each category:
	Alerts: alert, alerts, alerting, a, 1
	Promotions: promo, promotion, promotions, promotional, p, 2
	Notifications: notif, notification, notifications, notificational, n, 4		
*/
string msgCategory = "alert";


//post the data
doAPIPost(username
		  , password
		  , identity
		  , requestReceipt
		  , recipientName
		  , recipientPhoneNo
		  , msgContent
		  , outputType
		  , msgCategory
		  , zone);		
		
/**
Replace the below values with
the username and password of your registered account on Cloud Alert website */	
var username = "info@example.com";
var password = "xxxxxx";
	
/**
Replace the below value with the zone name value in your profile.*/				
var zone = "zone2";

/**
The name of the identity that the you have created 
within your online Cloud Alert account.*/				
var identity = "Chronus Ltd";	

/**
Indicates whether a delivery report is required for the sent message. 
The recommended values are 't'(True)/'f'(False). */
var requestReceipt = "t"; 

/**
The name of the recipient. Optional. This field is useful if names of recipients
are to be stored in your Sent Messages for your future reference.*/
var recipientName = "Sandra James";

/**
The destination phone number of the recipient (including the country code).
The phone number should be numeric, 
and not include any leading '0's or '+'symbols.*/
var recipientPhoneNo = "17606535300";

/** 
This is the message content that will be delivered to the recipient's handset*/
var msgContent = "Thanks for signing up";

/**
This indicates that the response of the POST would be in pipe-delimited format
(Pipe Separated Values) */
var outputType = "PSV";
	
/** 
This indicates the category of the message: Alert, Promotion or Notification
Valid message category values for each category:
	Alerts: alert, alerts, alerting, a, 1
	Promotions: promo, promotion, promotions, promotional, p, 2
	Notifications: notif, notification, notifications, notificational, n, 4		
*/
var msgCategory = "notif";


//post the data	
doAPIPost(username
		  , password
		  , identity
		  , requestReceipt
		  , recipientName
		  , recipientPhoneNo
		  , msgContent
		  , outputType
		  , msgCategory
		  , zone);	
		



POST the Message
public void doAPIPost(String username
					, String password
					, String identity
					, String requestReceipt
					, String recipientName
					, String recipientPhoneNo
					, String msgContent
					, String outputType
					, String msgCategory
					, String zone)
{		
	String urlStr = "https://"+zone+".api.cloudalert.cloud/rest/v1/sendmsg";		
	
	OutputStream os = null;
	BufferedReader in = null;						
	String responseStr = "";
	boolean postSuccess;
	String errorMsg = "";		
							
	try
	{	
		//encoding the params
		String dataToPost = "";		
		dataToPost += "u="+urlEncode(username);
		dataToPost += "&p="+urlEncode(password);
		dataToPost += "&i="+urlEncode(identity);
		dataToPost += "&r="+urlEncode(requestReceipt);
		dataToPost += "&n="+urlEncode(recipientName);
		dataToPost += "&d="+urlEncode(recipientPhoneNo);
		dataToPost += "&t="+urlEncode(msgContent);
		dataToPost += "&o="+urlEncode(outputType);
		dataToPost += "&c="+urlEncode(msgCategory);								
		
		
		print("");
		print("Posting");
		print("--------");
		print("to API: "+urlStr);
		print("Data: "+dataToPost);		
					
		
		//actual posting  		
		URL obj = new URL(urlStr);
		HttpURLConnection conn = (HttpURLConnection) obj.openConnection();
		conn.setRequestMethod("POST");
		conn.setRequestProperty("User-Agent", "Mozilla/5.0");		
		conn.setRequestProperty("Content-Type","application/x-www-form-urlencoded");			
		conn.setDoOutput(true);
		os = conn.getOutputStream();
		os.write(dataToPost.getBytes());
		os.flush();	
		
		
		//getting post response
		int responseCode = conn.getResponseCode();
		print("");
		print("Received POST Response Code: " + responseCode);
		
		if(responseCode == HttpURLConnection.HTTP_OK) //success
		{
			print("Posting data successful.");
			in = new BufferedReader(new InputStreamReader(conn.getInputStream()));
								
			String inputLine;				
			while ((inputLine = in.readLine()) != null) 
			{
				responseStr += inputLine;
			}		

														
			//checking if response is empty
			if(responseStr.trim().equals(""))
			{
				postSuccess = false;
				errorMsg = "Response is empty.";				
			}
			else
			{
				postSuccess = true;

				//printing the response
				print("Received response:");
				print("-----------------");
				print(responseStr);					
			}//end if(responseStr.trim().equals(""))
			
		}//end if(responseCode == HttpURLConnection.HTTP_OK)
		else //not successful
		{
			postSuccess = false;
			errorMsg = "POST request failed: "+conn.getResponseMessage();
			print(errorMsg);
		}// end else if(responseCode == HttpURLConnection.HTTP_OK)			

	}//end try
	catch(Exception e)
	{
		postSuccess = false;
		errorMsg = e.getMessage();						
	}
	finally
	{			
        try 
        {
            if (os != null) 
            {
                os.close();
            }
            
            if (in != null) 
            {
                in.close();
            }
        } 
        catch(IOException e) 
        {
			postSuccess = false;
			errorMsg = e.getMessage();			
        }			
	}//end finally						

	processResponse(postSuccess, errorMsg, responseStr);
	
}


private String urlEncode(String value)
throws UnsupportedEncodingException
{	
	return URLEncoder.encode(value, "UTF-8");		
}

		
public void print(String str)
{
	System.out.println(str);
}
		
function doAPIPost($username
				  , $password
				  , $identity
				  , $requestReceipt
				  , $recipientName
				  , $recipientPhoneNo
				  , $msgContent
				  , $outputType
				  , $msgCategory
				  , $zone
				  , $curlCAinfo)
{
	$urlStr = "https://".$zone.".api.cloudalert.cloud/rest/v1/sendmsg";	
	$postSuccess = true;
	$errorMsg = "";
	$responseStrList = [];

	$dataToPost = array(
						 'u' => $username
						,'p' => $password
						,'i' => $identity
						,'r' => $requestReceipt
						,'n' => $recipientName
						,'d' => $recipientPhoneNo
						,'t' => $msgContent
						,'o' => $outputType
						,'c' => $msgCategory);
								 
	try
	{
		//encoding and building the query params
		$encodedDataToPost = http_build_query($dataToPost);

		echon("");
		echon("Posting");
		echon("--------");
		echon("to API: ".$urlStr);
		echon("Data: ".$encodedDataToPost);	


		//checking if curl extension is enabled in the php.ini file
		if( ! in_array('curl', get_loaded_extensions()))
		{
			throw new Exception('Curl extension is not enabled in your php.ini configuration file. Kindly enable curl.');
		}

		//actual posting
		$curl = curl_init($urlStr);
		curl_setopt($curl, CURLOPT_POST, true);
		curl_setopt($curl, CURLOPT_POSTFIELDS, $encodedDataToPost);
		curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);			
		curl_setopt($curl, CURLOPT_CAINFO, $curlCAinfo);	

		$response = curl_exec($curl);		

		//checking if there's an error executing the request
		if($response === false)
		{
			$curl_err_no = curl_errno($curl);
			$curl_err_msg = curl_strerror($curl_err_no);
			throw new Exception('Curl Error: '.$curl_err_no.' - '.$curl_err_msg);
		}

		$responseCode = curl_getinfo($curl, CURLINFO_RESPONSE_CODE);			
		curl_close($curl);


		//getting post response
		echon("");
		echon("Received POST Response Code: " . $responseCode);

		//checking http response status code
		if($responseCode == 200) //response success
		{
			//checking if response is empty
			if(strlen(trim($response)) <= 0)
			{
				$postSuccess = false;
				$errorMsg = "Response is empty.";

			}
			else //response is not empty
			{
				//printing the response
				echon("Received response:");
				echon("-----------------");
				echon($response);	

				$responseStrList = explode("\n", $response);

			}//end else if(strlen(trim($response)) <= 0)

		}//end if($responseCode == 200) //response success
		else //response failed
		{
			$postSuccess = false;
			$errorMsg = "POST request failed: ".$response;
		}//end else if($responseCode == 200) //response success
	}//end try
	catch(Exception $e)
	{
		$postSuccess = false;
		$errorMsg = $e->getMessage();

	}

	processResponse($postSuccess, $errorMsg, $responseStrList);

}//end function doAPIPost


function echon($str)
{
	echo "\n".$str;
}
		
public void doAPIPost(string username
					, string password
					, string identity
					, string requestReceipt
					, string recipientName
					, string recipientPhoneNo
					, string msgContent
					, string outputType
					, string msgCategory
					, string zone)
{
	string dataToPost = "";		
	dataToPost += "u="+UrlEncode(username);
	dataToPost += "&p="+UrlEncode(password);
	dataToPost += "&i="+UrlEncode(identity);
	dataToPost += "&r="+UrlEncode(requestReceipt);
	dataToPost += "&n="+UrlEncode(recipientName);
	dataToPost += "&d="+UrlEncode(recipientPhoneNo);
	dataToPost += "&t="+UrlEncode(msgContent);
	dataToPost += "&o="+UrlEncode(outputType);
	dataToPost += "&c="+UrlEncode(msgCategory);	


	string urlStr = "https://"+zone+".api.cloudalert.cloud/rest/v1/sendmsg";	

	Stream dataStream = null;
	HttpWebResponse response = null;
	bool postSuccess;
	string errorMsg = "";
	string responseStr = "";


	print("");
	print("Posting");
	print("--------");
	print("to API: "+urlStr);
	print("Data: "+dataToPost);	


	try
	{
		//posting the request
		WebRequest request = WebRequest.Create(urlStr);
		request.Method = "POST";

		byte[] byteArray = Encoding.UTF8.GetBytes(dataToPost);
		request.ContentType = "application/x-www-form-urlencoded";
		request.ContentLength = byteArray.Length;

		dataStream = request.GetRequestStream();
		dataStream.Write(byteArray, 0, byteArray.Length);
		

		//getting the response
		response = (HttpWebResponse) request.GetResponse();
		int responseCode = (int) response.StatusCode;
		print("");
		print("Received POST Response Code: " + responseCode);


		if(response.StatusCode == HttpStatusCode.OK) //success
		{ 
			print("Posting data successful.");					

			using(dataStream = response.GetResponseStream())
			{
				StreamReader reader = new StreamReader(dataStream);
				responseStr = reader.ReadToEnd();
			}				

			//checking if response is empty
			if(string.Equals(responseStr.Trim(), ""))
			{
				postSuccess = false;
				errorMsg = "Response is empty.";				
			}
			else
			{
				postSuccess = true;

				//printing the response
				print("");
				print("Received response:");
				print("-----------------");
				print(responseStr);

			}//end if(responseStr.trim().equals(""))

		}//end if(responseCode == HttpStatusCode.OK) 
		else //request failed
		{
			postSuccess = false;
			errorMsg = "POST request failed";
			print(errorMsg);
		}//end else if(responseCode == HttpStatusCode.OK) 
	}//end try
	catch(Exception e)
	{
		postSuccess = false;
		errorMsg = e.Message;				
	}
	finally
	{
        try 
        {
            if(dataStream != null) 
            {
                dataStream.Close();
            }
            
            if(response != null) 
            {
                response.Close();
            }
        } 
        catch(Exception e) 
        {
				postSuccess = false;
				errorMsg = e.Message;						
        }	
	}//end finally		
	
	processResponse(postSuccess, errorMsg, responseStr);	

}//end function doAPIPost


public void print(string str)
{
	Console.WriteLine(str);
}

private String UrlEncode(string valueStr)
{
	return Uri.EscapeDataString(valueStr);
}
		

function doAPIPost(username
				  , password
				  , identity
				  , requestReceipt
				  , recipientName
				  , recipientPhoneNo
				  , msgContent
				  , outputType
				  , msgCategory
				  , zone)
{
	var host_addr = zone+".api.cloudalert.cloud";
	var api_path = "/rest/v1/sendmsg";

	var postSuccess = true;
	var errorMsg = "";

	var querystring = require('querystring');
	var http = require('https');

	var dataToPost = querystring.stringify({
											 'u' : username
											,'p' : password
											,'i' : identity
											,'r' : requestReceipt
											,'n' : recipientName
											,'d' : recipientPhoneNo
											,'t' : msgContent
											,'o' : outputType
											,'c' : msgCategory});

	print("");
	print("Posting");
	print("--------");
	print("to API: https://"+host_addr+api_path);
	print("Data: "+dataToPost);	


	//posting the request

	var post_options = {
						 host: host_addr
						 , path: api_path
						 , protocol: 'https:'
						 , method: 'POST'
						 , headers:{
										'Content-Type': 'application/x-www-form-urlencoded'
						 			   ,'Content-Length': Buffer.byteLength(dataToPost)
									}
						};


 	var post_req = http.request(post_options, function(res){
							res.setEncoding('utf8');
							var statusCode = res.statusCode;
							res.on('data', function(chunk){
													//print('Response: '+chunk);
													var responseFromServer = chunk;
													processResponse(statusCode, responseFromServer);
																	});
																 });

 	post_req.on('error', error => {
 		print("An error has occurred: "+error);
 	});

 	post_req.write(dataToPost);
 	post_req.end();

}


function print(str)
{
	console.log(str);	
}
		



Sample Response Format
POSTED:TRUE
ERROR: 
MESSAGE-ID:1005008812		
TRUE||1005008812		



Process the Response
public void processResponse(boolean postSuccess
						  , String errorMsg
						  , String responseStr)
{		
	if( ! postSuccess) //post failed
	{
		print("An error has occurred: "+errorMsg);
	}
	else //post was successful
	{
		String[] responseValues = responseStr.split("\|", -1);

		//verifying if the response is in the correct format
		if(responseValues.length < 3) 
		{
			print("Error: Invalid Response");
		}		
		else
		{
			//Extracting Response Details		
					
			/**
			Possible Values:
				TRUE: if the message was accepted successfully.
				FALSE: if the message was rejected by the gateway.*/
			String responseResult = responseValues[0];
			
			/**
			Error message if any occurred while posting the message to the queue. 
			The value will be blank if the message was accepted.*/
			String responseErrMsg = responseValues[1];				
			
			/**
			Server generated unique ID representing a message successfully posted 
			to the server. It is recommended that you store this value for future 
			reference. The value will be blank if the message post was unsuccessful.*/
			String messageID = responseValues[2];
								
			if(responseResult == null)															
			{
				print("Error: Invalid Response - POSTED value is null.");
			}
			else
			{
				if(responseResult.equals("FALSE"))
				{
					print("Error posting message: "+responseErrMsg);
				}
				else if(responseResult.equals("TRUE"))
				{
					print("Message was posted successfully:");
					print("Message ID: "+messageID);		
				}
				else
				{
					print("Error: Invalid Response - POSTED value can either be TRUE or FALSE.");
				}//end else if(responseResult.equals("FALSE"))
			}
		}//end else if(responseValues.length < 3) 	
	}//end else if( ! postSuccess)	
	print("");		
}
		
function processResponse($postSuccess, $errorMsg, $responseStrList)
{
	echon("");
	if( ! $postSuccess) //post failed
	{
		echon("An error has occurred: ".$errorMsg);
	}
	else //post was successful
	{
		$result = array();

		foreach($responseStrList as $responseLine)
		{
			list($key, $value) = array_pad(explode(':', $responseLine, 2), 2, null);

			$result[$key] = $value;
		}

		/**
		Possible Values:
			TRUE: if the message was accepted successfully.
			FALSE: if the message was rejected by the gateway.*/
		$responseResult = $result["POSTED"];
		
		/**
		Error message if any occurred while posting the message to the queue. 
		The value will be blank if the message was accepted.*/
		$responseErrMsg = $result["ERROR"];			
		
		/**
		Server generated unique ID representing a message successfully posted 
		to the server. It is recommended that you store this value for future 
		reference. The value will be blank if the message post was unsuccessful.*/
		$messageID = $result["MESSAGE-ID"];	

		if(empty($responseResult))
		{
			echon("Error: Invalid Response - POSTED value is not available.");
		}
		else
		{
			if($responseResult == "FALSE")
			{
				echon("Error posting message: ".$responseErrMsg);
			}
			else if($responseResult == "TRUE")
			{
				echon("Message was posted successfully:");
				echon("Message ID: ".$messageID);	
				
			}
			else
			{
				echon("Error: Invalid Response - POSTED value can either be TRUE or FALSE.");
			}//end else if(responseResult.equals("FALSE"))
		}
	}//end else if(!$postSuccess)
	echon("");
}
		
public void processResponse(bool postSuccess
						  , string errorMsg
						  , string responseStr)
{		
	if( ! postSuccess) //post failed
	{
		print("An error has occurred: "+errorMsg);
	}
	else //post was successful
	{
		string[] responseValues = responseStr.Split('|');

		//verifying if the response is in the correct format
		if(responseValues.Length < 3) 
		{
			print("Error: Invalid Response");
		}		
		else
		{
			//Extracting Response Details		
					
			/**
			Possible Values:
				TRUE: if the message was accepted successfully.
				FALSE: if the message was rejected by the gateway.*/
			String responseResult = responseValues[0];
			
			/**
			Error message if any occurred while posting the message to the queue. 
			The value will be blank if the message was accepted.*/
			String responseErrMsg = responseValues[1];				
			
			/**
			Server generated unique ID representing a message successfully posted 
			to the server. It is recommended that you store this value for future 
			reference. The value will be blank if the message post was unsuccessful.*/
			String messageID = responseValues[2];

			if(string.IsNullOrEmpty(responseResult))
			{
				print("Error: Invalid Response - POSTED value is not available.");
			}
			else
			{
				if(string.Equals(responseResult, "FALSE"))
				{
					print("Error posting message: "+responseErrMsg);
				}
				else if(string.Equals(responseResult, "TRUE"))
				{
					print("Message was posted successfully:");
					print("Message ID: "+messageID);						
				}
				else
				{
					print("Error: Invalid Response - POSTED value can either be TRUE or FALSE.");
				}//end else if(responseResult.equals("FALSE"))
			}
		}//end else if(responseValues.Length < 3) 
	}//end else if( ! postSuccess)
	print("");	
}
		
function processResponse(statusCode, responseFromServer)
{
	var postSuccess = true;
	var errorMsg = "";
	var responseStr = responseFromServer;

	print("");
	print("Received POST Response Code: " + statusCode);

	//START -- validating the response ---------------

	if(statusCode == 200) //success
	{ 
		print("Posting data successful.");

		//checking if response is empty
		responseStr = responseStr.trim();
		if(responseStr == null || responseStr=='')
		{
			postSuccess = false;
			errorMsg = "Response is empty.";				
		}
		else
		{
			//printing the response
			print("");
			print("Received response:");
			print("-----------------");
			print(responseStr);		
		}//end else if(responseStr == null || responseStr=='')
	}//end if(statusCode == 200)
	else//request failed
	{
		postSuccess = false;
		errorMsg = "POST request failed. Received status code: "+statusCode;
	}
	//END -- validating the response ---------------
		
	
	//START -- processing the response ---------------

	print("");
	
	if( ! postSuccess) //post failed
	{
		print("An error has occurred: "+errorMsg);
	}
	else //post was successful
	{
		var responseValues = responseStr.split("\|");

		//verifying if the response is in the correct format
		if(responseValues.length < 3) 
		{
			print("Error: Invalid Response");
		}		
		else
		{
			//Reading Response Details		
					
			/**
			Possible Values:
				TRUE: if the message was accepted successfully.
				FALSE: if the message was rejected by the gateway.*/
			var responseResult = responseValues[0];
			
			/**
			Error message if any occurred while posting the message to the queue. 
			The value will be blank if the message was accepted.*/
			var responseErrMsg = responseValues[1];			
			
			/**
			Server generated unique ID representing a message successfully posted 
			to the server. It is recommended that you store this value for future 
			reference. The value will be blank if the message post was unsuccessful.*/
			var messageID = responseValues[2];	


			if((responseResult === null) || (responseResult === ""))
			{
				print("Error: Invalid Response - POSTED value is not available.");
			}
			else
			{
				if(responseResult == "FALSE")
				{
					print("Error posting message: "+responseErrMsg);
				}
				else if(responseResult == "TRUE")
				{
					print("Message was posted successfully:");
					print("Message ID: "+messageID);	
				}
				else
				{
					print("Error: Invalid Response - POSTED value can either be TRUE or FALSE.");
				}//end else if(responseResult.equals("FALSE"))
			}
		}//end if(responseValues.length < 3) 	
	}//end else if( ! postSuccess) 
	print("");

	//END -- processing the response ---------------
}
		






Cookies on cloudalert.cloud
As described in our Privacy Policy, we place cookies on your device to improve usability of our website. You can change your cookie preferences by using your browser settings.
I accept