3
I’m trying to text through a Webservice.
To send a single SMS is simple. Just use the URL in this format:
https://xxxxx.com/sendMessage?messageText=mensagemdeteste&destination=552199998888&key=XXXX
But according to the Webservice documentation I can send several at the same time with this URL format:
https://xxxxx.com/sendMessageBatch?messageText=mensagemdeteste&key=XXXX
It says I should add the numbers to the HTTP POST BODY:
This option Allows one message to be sent to more than one phone number. Destination Numbers need to be in the body of the HTTP POST.
The body of the POST should be composed of Lines containing the Destination phone Numbers (line breaks only as separators):
destination1\\n<destination2>\\n<destination3>\\n<destinationN>
But how does it work?? I can only work on this body via server, via C# for example??
Cool, so just to complement... The url can send parameters, that’s one thing, and the http post body is something else and can be modified through a server language. That’s more or less it?
– Joao Paulo
But the body, can I only modify via server? And based on my example Content Type would be necessary?
– Joao Paulo
Thank you very much! I find it interesting to complement the answer with these remarks, but feel free!
– Joao Paulo
if I want to put the url parameters inside the "date:" together with the numbers is possible?
– Joao Paulo
@Joaopaulo Technically it is possible. Whether it will work or not depends on the implementation on the side of the provider of this service.
– OnoSendai
Onosendai, webReq.Getrequeststream() brings me a json object. But I saw in the documentation that if I want I can return in xml through "application/xml". You know how I can force it to bring me in xml?
– Joao Paulo
Was that right!!
– Joao Paulo
@Joaopaulo Good, I’m glad it worked - and I appreciate the generosity. =)
– OnoSendai