Wednesday, August 07, 2013

Plivo SMS gateway API in ColdFusion

In one of my project there was some requirement to send receive SMS using Plivo( http://plivo.com/ ) SMS gateway. Plivo doesn't provides any documentation for integration with ColdFusin but it's not so difficult to do as you will see below. So, I thought to provide the exact implementation in ColdFusion it might save save you time.

Before going to coding part we must have the credential for Plivo SMS gateway. :)

This SMS API integration have 2 parts:

- Send SMS and get Sent/Received SMS details(from,to,message id, time).
- Receive inbound SMS and initiate some ColdFusion logic.

1. Send SMS and get Sent/Received SMS details

You can download the code from below URL directly.  https://gist.github.com/roulupen/153845250fdab07c82bc or you can look for the below code.

2. Receive inbound SMS and initiate some ColdFusion logic

For receiving SMS instantly you need to make the following set up in Plivo server.
Login to Plivo Account - > Numbers

Then you will see the following screen.

So, here you can see the no linked to your Application and click on the "Demo Play" it may be different for you. Then you will see the following screen.


In the above screen you have to set the Message URL and Message method to receive the incoming message to your application

So, here I can set:
Message URL as: http://myplivotesting.com/receiveMessage.cfm
Message Method: POST/GET

So, when one incoming message will come Plivo will make a HTTP call to that particular URL. So, what are the fields we will get?
As shown in the above image you will get the red marked form fields form the Plivo Server and other fields are generated by my application.

So, you can write your logic in receiveMessage.cfm file to receive SMS make perform your business logic.

Hope it will save your time.
For detail API information please visit following URL:  http://plivo.com/docs/api/message/

6 comments:

  1. Thanks for sharing. Bulk SMS API also helps in improving customer relationships and is easily manageable at the same time.

    ReplyDelete
  2. . What this did was set up a new time standard which the consumers do not compromise on and find it inconvenient when that standard time is exceeded. For business, inconvenience is in the form of communication, which now require them to execute in real-time. So, any business which fails to communicate efficiently falls out of the steep competition. As mentioned earlier, technology is abundant and, on the rise, every day and today, business use simple text messages to execute real-time communication by connecting their websites or software with a texting service using SMS gateway.

    ReplyDelete
  3. Our Bulk SMS API is provided free of charge and supports all major development languages and environments including ASP, PHP, C# etc.

    ReplyDelete
  4. API SMS allows integrating Bulk SMS Gateway API into your application program for better control and functionality.

    ReplyDelete
  5. This post is really Helpful; it has helped me understand so many things. Thanks for the wonderful information. New Launch Info!

    ReplyDelete

Followers