Preloader

Text | Get

This command can be used to send text messages to individual numbers through HTTP GET request

Resource URL

https://www.alphamsg.in/AlphaMsgOrg/rest/msgapi/sendMsg

Details

KeyDescriptionExample
keyYour API Key received from AlphaMSGd17deb54c123db94d05d5598fcfdf28074abed5aaba675ebe6adf114a8a8wq35
mtMessage Type. Valid Values: T-Text, I-Invite, P-Poll, S-SurveyT
tiTitle of the Text MessageHello AlphaMSG
msgContent of the Text MessageThis is a sample message to say hello to AlphaMSG users
numList of phone numbers, (without country code) separated by comma, for whom the message to be sent9876543210,9988776655
priPriority of the message. Valid Values: H, M, L - where H-High (Alert/Critical), M-Medium (Caution/Warning), L-Low (Information)H
delDelivery mode of the message. Valid Values: I, R - where I-Instant (Push notification will be delivered instantly), R-Regular (Push notification will be delivered within 2 mins). Default Value - RI

Sample Code

PHP
Java
C#
<?php

// Account details
$key = urlencode('d17deb54c123db94d05d5598fcfdf28074abed5aaba675ebe6adf114a8a8wq35');
//Message details
$mt = urlencode('T');
$ti = urlencode('Hello AlphaMSG');
$num = urlencode('9876543210,9988776655');
$msg = rawurlencode('This is a sample message to say hello to AlphaMSG users');
$pri = urlencode('H');
// Prepare data for POST request
$data = 'key=' . $key . '&mt=' . $mt . '&ti=' . $ti . '&num=' . $num . '&msg=' . $msg . '&pri=' . $pri;
// Send the GET request with cURL
$ch = curl_init('https://www.alphamsg.in/AlphaMsgOrg/rest/msgapi/sendMsg/?' . $data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
// Process your response here
echo $response;

?>