2-way sms / command returns response text

2-way sms / command returns response text SearchSearch
Author Message
Joan DIMKO
New member
Username: Jdimko

Post Number: 4
Registered: 02-2011
Posted on Thursday, February 17, 2011 - 11:40 am:   

I have configured nowsms with 2-way sms with "command returns response text" enabled.
For sms sent with txt XXX the web application receives the request and sends back the corresponding response to the sender.
For sms sent with txt YYY, the web application is programmed not to respond to this request. In this case NowSms sends back to sender the message: "Command not completed. Request returned invalid content type: text/html".
How can i deal with this issue ?
I want to have the following results:
when XXX message is sent - sms with response will be sent to sender
when YYY message is sent - NOTHING to be sent to the sender. ("Command not completed. Request returned invalid content type: text/html" - should not be sent to sender !)
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 2922
Registered: 08-2008
Posted on Thursday, February 17, 2011 - 05:04 pm:   

Hi Joan,

Normally you would specify the content-type as text/plain but leave the actual content blank.

However, I seem to recall from another of your posts that are you are using an outdated (6+ years old) version of NowSMS, so I do not know if that version will support this technique.

If it does not, the alternative is to not use "Command returns response text", and instead have your script initiate HTTP requests to NowSMS to send messages, or use the redirect technique described in http://www.nowsms.com/2-way-sms-returning-a-non-text-response.

--
Des
NowSMS Support