Flowroute Sending SMS API using PHP

In this Post We Will Explain About is Flowroute Sending SMS API using PHP With Example and Demo(Add SMS using flowroute on Yii 1.1).Welcome on infinityknow.com – Examples, The best For Learn web development Tutorials,Demo with Example! Hi Dear Friends here u can know to Flowroute Send SMS With API Gateway‎ using PHPExample

In this post we will show you Best way to implement Flowroute Sending SMS using PHP, hear for Flowroute messaging SDK in PHPwith Download .we will give you demo,Source Code and examples for implement Step By Step Good Luck!.

Steps

READ :  Vue Expand Collapse using Vuejs-Expand and collapse with Vuejs - Accordion

Step 1 : First of all Sign up and retrieve your simple API credentials
Step 2 : and then Purchase a phone number
Purchase a phone number

Step 3 : Send your message
Send your message

In this POST, we will show you simple two methods of creating an PHP HTTP POST request to the Flowroute simple Messaging API:

Request via cURL using PHP

Open a simple command shell session using PHP.

If you haven’t any installed cURL using PHP previously,

Copy the following example POST request.

 
 curl https://api.flowroute.com/v2/messages \
-u accessKey:secretKey -X POST \
-H "Content-Type: application/json" \
-d '{"to":"12061231234","from":"12065551234", "body":"hello world"}'

Send Your First SMS

 '+919999999999', 'from' => 'Your Purchase Number', 'body' => 'Testing For infinityknow.com Example');
                                                      
$data_string = json_encode($data);            
$ch = curl_init($URL);                                                                      
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST"); 
curl_setopt($ch, CURLOPT_USERPWD, $accessKey . ":" . $secretKey);                                                                    
curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string);                                                                  
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);                                                                      
curl_setopt($ch, CURLOPT_HTTPHEADER, array(                                                                          
    'Content-Type: application/json',                                                                         'Content-Length: ' . strlen($data_string))                                                                       
);                                                                                                           
$result = curl_exec($ch);
print_r($result);
?>

Replace simple accessKey:secretKey with your and set PHP API credentials.
In the -d (data) all the option of your PHP cURL request, creating the following Points:

  • First Replace the from value with your (purchased)Flowroute phone number.
  • Second Replace the to simple value with the simple recipient your phone number.
  • Third Replace the Messaging body with your simple text send message.
READ :  Angularjs Add class to Active Element ng-class Menu

Example Response

{ 
	"data": { 
		"id": "mdr1-c102bbd7b662446eb64d4744c115bb60" 
		} 
} 

Example

I hope you have Got What is Flowroute Send SMS With API Gateway‎ using PHP And how it works.I would Like to have FeadBack From My Blog(infinityknow.com) readers.Your Valuable FeadBack,Any Question,or any Comments abaout This Article(infinityknow.com) Are Most Always Welcome.