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

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


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:


You will need API credentials. Click on the following link to register for a trial account; 

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


Please sign in to leave a comment.
Powered by Zendesk