FreeSMSGateway.com has a simple HTTP POST API to easily send messages to your existing contacts or a custom list of contacts. You can choose to send a text message via the gateway to all your existing contacts that were entered via the web portal or provide an array of phone numbers via the API to send the text messages to.
Send a POST call to http://www.FreeSMSGateway.com/api_send with the following POST variables:
- access_token: Your API Access Token from your account dashboard
- message: The url encoded message, 160 characters or less
- send_to: This value need to be "existing_contacts" to send to all your existing contacts in your account or "post_contacts" to supply a custom list of contacts
- post_contacts: A JSON array of contacts to send the message to instead of your existing contacts. Only required is "send_to" is set to "post_contacts"
PHP Example: Send Message to Existing Contacts
PHP Example: Send Message to Custom List of Contacts
Possible Error Messages
Invalid access token or inactive account.
Please check your account to be sure you are able to login and that the API Key is correct.
The message was blank.
The message field was blank or was not properly URL encoded.
There were no phone numbers included in the "post_contacts" field.
There were no valid mobile phone numbers submitted in the send_to array.