Incoming SMS API Documentation
Understanding The Difference Between The Keyword Submission API And The Inbox Replies API
Group Texting allows you to implement your own APIs to receive and/or forward incoming messages to your server. Please check out the list of parameters which Group Texting Texting sends to your server, which your APIs must accept.
When someone sends in your keyword [space] message or just replies without a keyword within 12 hours of you sending a message to them, the Inbox Reply API is used where the variable is called from. If someone sends in only your keyword then the Keyword API is invoked and that variable is called Phone Number.
**Please note that if you are testing your API implementation with the same phone number again and again, when you send in your keyword submission and you get a reply back then the keyword reply is considered as an outgoing message. Consequently, if you send in keyword [space] message again through the same phone number, The Inbox Reply API will be invoked and NOT the Keyword API.
Many of our API clients use different scripts to process forwarded messages (messages that are replies or keyword [space] message) vs just keywords. This is the cause of the difference between the name of the variables.
If you have Send Unique Requests Checked then your Keyword URL will only be called once and not your Forwarding URL in cases when a message is considered to be a keyword submission and not a reply to an outbound message from your account.
If you have Wait for Response From My Server Checked then the system will wait for output to send back to the person who texted in. We suggest that you have both these Checked as it would work for most applications.
Receiving Keyword Submissions
Group Texting allows SMS messages to be received using HTTP through the means of keywords on our long code. This page details the format of the HTTP requests which are sent by the Group Texting SMS Server to allow the receipt of SMS text messages by external software systems.
The Group Texting SMS Server will push received SMS messages by making an HTTP GET request to the provided URL to indicate the receipt of an SMS message. You can input this URL on the Keywords section of your Group Texting account.
Example URL
http://www.yourdomain.com/receivesms.php?PhoneNumber=5554443333&Message=Hello%20my%20friend
Message Format
On receipt of an SMS we will send an HTTP GET request to your server, using the parameters included in the table below:
PhoneNumber | Phone number message originated from. |
Message | The body of your message that was texted in by the originating phone number prefaced by your keyword. |
Example Request Sent
http://www.yourdomain.com/receivesms.php?PhoneNumber=5554443333&Message=Hello%20my%20friend
Response To The Server
When the GET post is made to your server, your script must output your SMS response in plain text format (max 160 characters) that will be sent back to the originating phone number through our long code. This response must be given in a timely manner (sub 60 seconds) or it will be abandoned. Your server must also respond with a 200 OK Status. No additional calls to our servers are necessary.
The list of allowed characters for messages is: a-z, A-Z, 0-9 and these special characters: .,:;!?()~=+-_\/@$#&%
The following characters count as two characters when used: ~ @ # % + = / \ \r\n
Receiving Inbox Message Replies
All replies to your inbox will be forwarding to the URL you specify. The Group Texting SMS Server will push received SMS messages by making an HTTP GET to the provided URL.
Example URL
http://www.yourdomain.com/receivesms.php?From=5554443333&Message=Hello%20my%20friend
Example Request Sent
We will send an HTTP GET request to your server, using the parameters:
from | Phone number message originated from. |
message | The body of receiving message that was texted in by the originating phone number. |
http://www.yourdomain.com/sms.php?from=5554443333&message=Hello%20World
Options
Send unique request: Check this if you have both keyword URL and forwarding URLs setup and you do not wish to receive duplicate message forwards.
Wait for response from my server: If you require an incoming reply to have an auto-reply, select this option. We will send this response as an auto-reply via HTTP GET.
Whether you have the Wait For Response From My Server option turned on or off, your server must respond with a 200 OK Status within 60 seconds or it will be abandoned.
The list of allowed characters for messages is: a-z, A-Z, 0-9 and these special characters: .,:;!?()~=+-_\/@$#&%
The following characters count as two characters when used: ~ @ # % + = / \ \r\n
Please note: If you have a keyword and both the keyword URL and forwarding URLs are setup with the same URL, check should click "Send Unique Request" so we only send one GET request.