How to Send Text Messages Using TxtImpact SMS API Using PHP
This article explain you steps to send text messages using txtimpact sms API. SMS API lets you make a simple HTTP request and send a text message. Here is how you use it.
|
This article has been tagged as a stub. That means it's off to a good start, but still has plenty of room to grow before it reaches its full potential. Can you help it flourish? If you think the article offers complete and accurate instructions, feel free to remove this tag! |
EditSteps
-
1Signup for your txtimpact developer account
-
2Once your account is ready, retrieve your user Id, Password, VASId from dashboard.
- Sample code to SMS Text message from PHP;
- <?php
- $ch = curl_init(http://smsapi.TxtImpact.com/smsadmin/submitsm.aspx');
- curl_setopt($ch, CURLOPT_POST, 1);
- curl_setopt($ch, CURLOPT_POSTFIELDS, "VERSION=2.0&userid=[username]&password=[userpassword]&VASId=[VASId]&FROM=27126&TO=[Mobile Number]&Text=[Text Message]);
- curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
- $data = curl_exec($ch);
- Print($data); /* result of API call*/
- ?>
- Sample code to SMS Text message from PHP;
-
3Wait for the return message. The API will return a string message to the calling application. The response from Send SMS APIs or Text Messaging API:
- Successful submission:
- JOBID: [MOBILENUMBER]:[SMSID]
- Failed submission:
- ERR: 301: Failed authentication
- ERR: 305: Not enough credits
- ...
- This completes your call to TxtImpact SMS API using PHP.
We could really use your help!
glue removal?
Adobe Photoshop?
married life?
sabbaticals?
EditSources and Citations
- The docs for sending an SMS message using the HTTP API can be found at http://www.txtimpact.com/sms-gateway-api.asp
Article Info
Categories: Stub | Website Application Instructions
Thanks to all authors for creating a page that has been read 462 times.

About this wikiHow