From 816245f0ac7238a38af8416a7fe8bd1fded9811a Mon Sep 17 00:00:00 2001
From: Jesse Young An incoming MMS message with an
For a successful request, the server should return HTTP status code 200.
-If the signature check failed, the server should return status code 403.
-Other status codes may be used to signify errors.
+Failed requests should return HTTP status codes between 400 and 499 inclusive.
+Failed requests may optionally return an error message to display in the phone logs, as
+a text/xml response like
+
+
EnvayaSMS for Drupal (2012/03/04)
diff --git a/.phrozn/entries/serverapi/index.twig b/.phrozn/entries/serverapi/index.twig
index a23eadc..f0fa887 100755
--- a/.phrozn/entries/serverapi/index.twig
+++ b/.phrozn/entries/serverapi/index.twig
@@ -47,13 +47,13 @@ HTTP Request Format
POST /sg/app HTTP/1.1
X-Request-Signature: sAemG31uRllk/K9xck2WRNaF/WI=
-Content-Length: 120
+Content-Length: 140
Content-Type: application/x-www-form-urlencoded
Host: 192.168.70.1:3000
Connection: Keep-Alive
from=6505551234&message_type=sms&message=test&version=2&phone_number=16505551212
-&action=incoming×tamp=1317506831000
+&action=incoming&age=23&network=WIFI×tamp=1317506831000
image/jpeg
part and a text/plain
part with message 'Test':action=incoming
:
action=incoming
and message_type=mms
:
@@ -368,7 +379,7 @@ Additional parameters sent in POST requests with action=send_status
of an sms tag in a previous XML response from the server).
- action=device_status
The phone's battery level is now at least 20% (after dropping below 15%).
+
+
<response><error>...</error></response>
HTTP response for action=incoming and action=outgoing
@@ -430,13 +448,15 @@ Example:
HTTP/1.1 200 OK
Content-Type: text/xml
-Content-Length: 189
+Content-Length: 212
<?xml version='1.0' encoding='UTF-8'?>
+<response>
<messages>
<sms id='1540' to='16505551213'>This is a test</sms>
<sms id='1541' to='16505551214'>This is a another test message.</sms>
</messages>
+</response>
Specification:
@@ -444,9 +464,24 @@ Specification:
The Content-Type
header should be text/xml
, with the content as follows:
- The response content for send_status
requests is currently undefined and ignored.
HTTP status code 200 signifies success, and anything else signifies failure.
+ The response content for successful send_status
requests is currently ignored, except that
+ requests with HTTP code 400-499 may return an error message as text/xml.
For general discussion, questions, or feedback about EnvayaSMS, use the public forum at @@ -83,8 +82,6 @@ Facebook: Envaya
To contact the EnvayaSMS developers privately, email sms-developers@envaya.org.
- -