Change reply message in twilio SMS API

I am working with twilio sms api integrated with coldfusion.This is the blog for change reply message in twilio SMS API.It is very simple just make a cfm file which return xml and check return body message  like this ...


<cfif form.body EQ "HELP">
<cfsavecontent variable="response">
<?xml version="1.0" encoding="UTF-8"?>
<Response>
<Sms>This is Test Reply for help.</Sms>
</Response>
</cfsavecontent>
<cfelseif form.body EQ "STOP">
<cfsavecontent variable="response">
<?xml version="1.0" encoding="UTF-8"?>
<Response>
<Sms>This is Test Reply for stop.</Sms>
</Response>
</cfsavecontent>
<cfelse>
<cfsavecontent variable="response">
<cfoutput>
<?xml version="1.0" encoding="UTF-8"?>
<Response>
<Sms>This is Test Thanks Reply. Reply HELP for help.Reply STOP to unsubscribe. Recvd: #xmlFormat(Left(form.body,75))#</Sms>
</Response>
</cfoutput>
</cfsavecontent>
</cfif>
<cfcontent type="text/xml" variable="#toBinary(toBase64( trim( response ) ) )#" />
view raw reply.cfm hosted with ❤ by GitHub

Comments

Popular posts from this blog

Login with facebook using coldfusion

Create CSV file in Coldfusion Using CFFile

Get Previous One Day Data in Sql Server