Follow

How to Send Text Message using cURL?

SMS API usage example from cURL:

 

curl --data "vasid=xxxxx&userid=xxxxx&password=xxxxx&to=xxxxxxx&from=27126” –data-urlencode text=”test#//$%” -s http://msgapi.wire2air.com/smsapi/submitsm.aspx

The following is with the ReplyPath to handle STOP or any replies from the user.

curl --data "vasid=xxxxx&userid=xxxxx&password=xxxxx&to=xxxxxx&from=27126" –data-urlencode text=”test#//$%”  –data-urlencode replypath=”http://{your server url}” -s http://msgapi.wire2air.com/smsapi/submitsm.aspx

  

The --data--urlencode will encode the value of $value for you, so you don't have to do it. Unfortunately, this parameter doesn't exist in all versions of curl. It was added in version 7.18.0 back in January of 2008. Run curl --version to see what version you have:

To receive messages you would need to deploy a web server, for instructions on how to receive messages:

https://www.txtimpact.com/sms-http-api/

 

You will need API credentials. Click on the following link to register for a trial account; https://mzone.wire2air.com/mserver/vas/plansignup.aspx?ref=txt&plancategory=api&trial=Y 

Once registered, go to Manage Account - > API information to access your VASID.

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.
Powered by Zendesk