Difference between revisions of "MO SOAP"

From SMS Wiki
Jump to: navigation, search
(New page: Collecting mobile originated messages from your account using SOAP methods is done using 4 available functions: * GetNewInboxCount - returns the number of new messages in your Inbox * Ge...)
 
 
(5 intermediate revisions by one user not shown)
Line 9: Line 9:
 
* GetBottomMessage - Used to get the earliest new sms message in inbox. Message flag is set to "read" after this function is completed  
 
* GetBottomMessage - Used to get the earliest new sms message in inbox. Message flag is set to "read" after this function is completed  
  
 +
Before you can use these functions you must obtain [[Authentication | Token/Signature ]] for your account. This is needed only once.
  
Send_Plain_Multiple is API function that allows you to send up to 25 messages (same message to 25 recipients) with one function call. This page describes error statuses which Send_Plain_Multiple can generate
 
  
 +
Go to http://moapi.upsidewireless.com to access the above function calls
  
'''Send successful - all messages were sent'''
+
 
 +
'''''Results'''''
 +
 
 +
'''Result of method GetNewInboxCount'''
 
----
 
----
  <?xml version="1.0" encoding="utf-8" ?>  
+
<?xml version="1.0" encoding="utf-8" ?>  
- <SMSSendMultipleResult xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://upsidewireless.com/webservice/sms">
+
<int xmlns="http://upsidewireless.com/webservice/sms">2</int>  
  <isOk>true</isOk>
+
  <successCount>3</successCount>
+
  <failedCount>0</failedCount>
+
  </SMSSendMultipleResult>
+
  
 +
If no new messages exist the function returns 0.
  
'''''Failed sending or partial fail'''''
 
  
'''No recipients - no message will be sent'''
+
 
 +
 
 +
'''Result of method GetNewInboxMessages'''  
 
----
 
----
 
   <?xml version="1.0" encoding="utf-8" ?>  
 
   <?xml version="1.0" encoding="utf-8" ?>  
- <SMSSendMultipleResult xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://upsidewireless.com/webservice/sms">
+
- <ArrayOfNewSMSMessage xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://upsidewireless.com/webservice/sms">
   <isOk>false</isOk>  
+
- <NewSMSMessage>
   <successCount>0</successCount>  
+
   <isValid>true</isValid>  
   <failedCount>0</failedCount>  
+
   <sender>+17788580767</sender>  
   <errorMessages>No recipients</errorMessages>  
+
   <data>e test email command</data>  
   </SMSSendMultipleResult>
+
   <name>username</name>
 +
  <inboundnumber>16047658410</inboundnumber>
 +
  <messageid>Mail1280535182021-4</messageid>
 +
  </NewSMSMessage>
 +
- <NewSMSMessage>
 +
  <isValid>true</isValid>
 +
  <sender>+17788580767</sender>
 +
  <data>test message</data>
 +
  <name>username</name>
 +
  <inboundnumber>16047658410</inboundnumber>
 +
  <carriercode>302720</carriercode>
 +
  <messageid>Mail1300928784355-5</messageid>
 +
  </NewSMSMessage>
 +
   </ArrayOfNewSMSMessage>
  
 +
If no new messages exist, there will be no NewSMSMessage blocks. All new messages will be set to "read" so you will no longer be able to fetch them.
  
'''Excess maximum recipients - no message will be sent'''
+
 
 +
 
 +
'''Result of method GetTopMessage'''
 
----
 
----
 
   <?xml version="1.0" encoding="utf-8" ?>  
 
   <?xml version="1.0" encoding="utf-8" ?>  
- <SMSSendMultipleResult xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://upsidewireless.com/webservice/sms">
+
- <NewSMSMessage xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://upsidewireless.com/webservice/sms">
   <isOk>false</isOk>  
+
   <isValid>true</isValid>  
   <successCount>0</successCount>  
+
   <sender>+17788580767</sender>  
   <failedCount>26</failedCount>  
+
   <data>test message</data>  
   <errorMessages>Excess maximum recipients (25)</errorMessages>  
+
   <name>taylorsun</name>  
   <errorNumbers>17788580767,16046668888,17788456789, 456789, 123456, 65743211, ...</errorNumbers>  
+
   <inboundnumber>16047658410</inboundnumber>
   </SMSSendMultipleResult>
+
  <carriercode>302720</carriercode>
 +
  <messageid>Mail1300928784355-5</messageid>  
 +
   </NewSMSMessage>
  
 +
If no new messages exist, there will be no sender, data.. blocks. If there are new messages you will get the top message. Upon retrieval, its flag will be set to "read" so you will no longer be able to fetch it.
  
'''Partial Success - some messages will not be sent (in the below example 2)'''
+
 
 +
 
 +
'''Result of method GetBottomMessage'''
 
----
 
----
 
   <?xml version="1.0" encoding="utf-8" ?>  
 
   <?xml version="1.0" encoding="utf-8" ?>  
- <SMSSendMultipleResult xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://upsidewireless.com/webservice/sms">
+
- <NewSMSMessage xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://upsidewireless.com/webservice/sms">
   <isOk>false</isOk>  
+
   <isValid>true</isValid>  
   <successCount>3</successCount>  
+
   <sender>+17788580767</sender>  
   <failedCount>2</failedCount>  
+
   <data>e test email command</data>  
   <errorMessages>recipient length invalid,recipient length invalid</errorMessages>  
+
   <name>taylorsun</name>  
   <errorNumbers>456789,123456</errorNumbers>  
+
   <inboundnumber>16047658410</inboundnumber>  
   </SMSSendMultipleResult>
+
   <messageid>Mail1280535182021-4</messageid>  
 +
  </NewSMSMessage>
 +
 
 +
If no new messages exist, there will be no sender, data.. blocks. If there are new messages you will get the bottom (earliest received) message. Upon retrieval, its flag will be set to "read" so you will no longer be able to fetch it.

Latest revision as of 13:18, 27 May 2011

Collecting mobile originated messages from your account using SOAP methods is done using 4 available functions:

  • GetNewInboxCount - returns the number of new messages in your Inbox
  • GetNewInboxMessages - Gets new sms messages from your inbox (maximum 300). Upon collection, messages are set to "read"
  • GetTopMessage - Used to get the latest new sms message in inbox. Message flag is set to "read" after this function is completed
  • GetBottomMessage - Used to get the earliest new sms message in inbox. Message flag is set to "read" after this function is completed

Before you can use these functions you must obtain Token/Signature for your account. This is needed only once.


Go to http://moapi.upsidewireless.com to access the above function calls


Results

Result of method GetNewInboxCount


<?xml version="1.0" encoding="utf-8" ?> <int xmlns="http://upsidewireless.com/webservice/sms">2</int>

If no new messages exist the function returns 0.



Result of method GetNewInboxMessages


 <?xml version="1.0" encoding="utf-8" ?> 

- <ArrayOfNewSMSMessage xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://upsidewireless.com/webservice/sms"> - <NewSMSMessage>

 <isValid>true</isValid> 
 <sender>+17788580767</sender> 
 e test email command 
 <name>username</name> 
 <inboundnumber>16047658410</inboundnumber> 
 <messageid>Mail1280535182021-4</messageid> 
 </NewSMSMessage>

- <NewSMSMessage>

 <isValid>true</isValid> 
 <sender>+17788580767</sender> 
 test message 
 <name>username</name> 
 <inboundnumber>16047658410</inboundnumber> 
 <carriercode>302720</carriercode> 
 <messageid>Mail1300928784355-5</messageid> 
 </NewSMSMessage>
 </ArrayOfNewSMSMessage>

If no new messages exist, there will be no NewSMSMessage blocks. All new messages will be set to "read" so you will no longer be able to fetch them.


Result of method GetTopMessage


 <?xml version="1.0" encoding="utf-8" ?> 

- <NewSMSMessage xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://upsidewireless.com/webservice/sms">

 <isValid>true</isValid> 
 <sender>+17788580767</sender> 
 test message 
 <name>taylorsun</name> 
 <inboundnumber>16047658410</inboundnumber> 
 <carriercode>302720</carriercode> 
 <messageid>Mail1300928784355-5</messageid> 
 </NewSMSMessage>

If no new messages exist, there will be no sender, data.. blocks. If there are new messages you will get the top message. Upon retrieval, its flag will be set to "read" so you will no longer be able to fetch it.


Result of method GetBottomMessage


 <?xml version="1.0" encoding="utf-8" ?> 

- <NewSMSMessage xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://upsidewireless.com/webservice/sms">

 <isValid>true</isValid> 
 <sender>+17788580767</sender> 
 e test email command 
 <name>taylorsun</name> 
 <inboundnumber>16047658410</inboundnumber> 
 <messageid>Mail1280535182021-4</messageid> 
 </NewSMSMessage>

If no new messages exist, there will be no sender, data.. blocks. If there are new messages you will get the bottom (earliest received) message. Upon retrieval, its flag will be set to "read" so you will no longer be able to fetch it.