"+" http request ignored

"+" http request ignored SearchSearch
Author Message
Constantinos Psilogenis
New member
Username: Constgp

Post Number: 12
Registered: 03-2010
Posted on Monday, October 26, 2015 - 09:21 am:   

Hello,

Our provider needs TON 2 for international numbers.
So I use "+" in the number so the the correct TON to be send.
The proble is using the http request the "+" is ignored by the nowsms gateway.
i.e the following request:
http://SERVERIP:PORT/?PhoneNumber=+35799224400&User=user&Password=pass&Text=HI&S ender=SMSServer
the answer is the following
Message Submitted

Continue


MessageID=4B5B1660, Recipient=35799224400

Any ideas?
}
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 5487
Registered: 08-2008
Posted on Monday, October 26, 2015 - 11:20 am:   

Hi,

In HTTP, some characters must be escaped to include in a URL parameter.

For example, to use a space (blank) character it is encoded as either + or by its numeric code %20.

Because + is the encoding for the space character, to actually send +, it must be encoded as %2B.

For more info on characters that require special URL encoding, see the table at the bottom of http://www.nowsms.com/doc/submitting-sms-messages/sending-sms-text-messages

--
Des
NowSMS Support
Constantinos Psilogenis
New member
Username: Constgp

Post Number: 13
Registered: 03-2010
Posted on Monday, October 26, 2015 - 04:58 pm:   

Hello,

It worked.

Thank you for your quick response.

Best Regards

Constantinos Psilogenis
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 5488
Registered: 08-2008
Posted on Monday, October 26, 2015 - 07:43 pm:   

Hi,

After my earlier reply, I was reminded that there are also advanced configuration options that can adjust prefixes automatically, which you might find useful. More description here: http://www.nowsms.com/international-prefix-conversion-for-sms

--
Des
NowSMS Support