API SMS

From Xminder
Jump to: navigation, search

Xminder API SMS Documentation

Contents


Send SMS


Sends an text message.
Parameter Description Example
key

The access key to make a request to a module.

This key is provided by Xminder's administrators and it must NOT be published.

The default value for this parameter is NULL.

5d952f8293148969d4c87518e5524641
to The recipient's phone number. Only digits are accepted here. 0000000000
from From whom is the text message. Here are accepted both letters and digits. Xminder
text The text of the message. The maximum accepted lenght is 918 characters. Greetings from Xminder
callbackUrl (Optional) The API callback URL you specify is used to send the reply (parameters: id and reply). http://webpage.com
responseType

(Optional) The format of the response.

The response to request may be displayed in the following formats: xml, json or text.

The default value for this parameter is xml.

responseType=xml
responseType=json
responseType=text
Observations:
  1. The parameters key, to, from and text are required parameters.
  2. The values of the parameters key, to and callbackUrl from the table above (column Example) are not valid.
  3. If the parameter text must include symbols like "&" (ampersand), "#" (pound sign), "+" (plus sign) or other special characters:
    • if the URL will be used from the browser's address bar these characters should be encoded (using their code points in hexadecimal) like so: # = %23, & = %26, + = %2B etc.
    • if the URL will be used from PHP, it should be used the urlencode function first.


Simple Example


URL: https://api.xminder.com/sms.send?key=5d955f8293148969d4b82518e5524646&to=0000000000&from=Xminder&text=Greetings from Xminder

Success (the id received in the response is used in the SMS Status Verification method):
<response>
    <success>true</success>
    <id>74417d7ffh85c8ad03a5edfh6a9bcf2a</id>
</response>


Error:

<response>
    <success>false</success>
    <error>E_SOMETHING</error>
</response>



Send More SMS


Sends an text message to one or more numbers.
Parameter Description Example
key

The access key to make a request to a module.

This key is provided by Xminder's administrators and it must NOT be published.

The default value for this parameter is NULL.

5d952f8293148969d4c87518e5524641
to The recipient's phone number. Only digits are accepted here. Numbers are separated by "|" (pipe symbol). 0000000000
0000000000|1111111111
from From whom is the text message. Here are accepted both letters and digits. Xminder
text The text of the message. The maximum accepted lenght is 918 characters. Greetings from Xminder
callbackUrl (Optional) The API callback URL you specify is used to send the reply (parameters: id and reply). http://webpage.com
responseType

(Optional) The format of the response.

The response to request may be displayed in the following formats: xml, json or text.

The default value for this parameter is xml.

responseType=xml
responseType=json
responseType=text
Observations:
  1. The parameters key, to, from and text are required parameters.
  2. The values of the parameters key, to and callbackUrl from the table above (column Example) are not valid.
  3. If the parameter text must include symbols like "&" (ampersand), "#" (pound sign), "+" (plus sign) or other special characters:
    • if the URL will be used from the browser's address bar these characters should be encoded (using their code points in hexadecimal) like so: # = %23, & = %26, + = %2B etc.
    • if the URL will be used from PHP, it should be used the urlencode function first.


Simple Example


URL: https://api.xminder.com/sms.sendmore?key=5d955f8293148969d4b82518e5524646&to=0000000000|1111111111&from=Xminder&text=Greetings from Xminder

Success (the id received in the response is used in SMS Status Verification method):
<response>
    <nr1-0000000000>
        <success>true</success>
        <id>74417d7ffh85c8ad03a5edfh6a9bcf2a</id>
    </nr1-0000000000>
    <nr2-1111111111>
        <success>true</success>
        <id>74417d7ffh85c8ad03a5edfh6a9bcf3a</id>
    </nr2-1111111111>
</response>


Error:

<response>
    <nr1-0000000000>
        <success>false</success>
        <error>E_SOMETHING</error>
    </nr1-0000000000>
    <nr2-1111111111>
        <success>true</success>
        <id>74417d7ffh85c8ad03a5edfh6a9bcf3a</id>
    </nr2-1111111111>
</response>



SMS Status Verification


Checks the status of a sent SMS.
Parameter Description Example
key

The access key to make a request to a module.

This key is provided by Xminder's administrators and it must NOT be published.

The default value for this parameter is NULL.

5d952f8293148969d4c87518e5524641
id The ID that you have previously received in the RESPONSE of the Send SMS or the Send More SMS methods. 74417d7ffh85c8ad03a5edfh6a9bcf2a
Observations:
  1. The parameters key and id are required parameters.
  2. Parameters' names for this method are case sensitive. This means that id (that is a correct parameter's name) is different than ID.
  3. The values of the parameters from the table above (column Example) are not valid.


Simple Example


URL: https://api.xminder.com/sms.status?key=5d955f8293148969d4b82518e5524646&id=74417d7ffh85c8ad03a5edfh6a9bcf2a

Success:
<response>
    <success>true</success>
    <status>0</status>
</response>


Error:

<response>
    <success>false</success>
    <error>E_SOMETHING</error>
</response>


Statuses:
Value Name Description
-1 In Queue Phone number in sms queue. It will be processed.
0 Sent SMS message was sent.
1 No Gateway Server No Gateway Server.
2 Empty Cell Phone Empty cell phone.
3, 31, 32, 33 Invalid Cell Phone Invalid phone number.
4 Phone In DNS List Number in the DNS List.
5 Invalid ITR Invalid Interactive Text Response.
6 Invalid ITR Settings Invalid ITR settings.
7 Gateway Error Gateway error.
8, 88 Failed Not delivered.
9 In Progress Sending...
10 Delivered SMS message delivered.
11 Credit Expired No valid credit.
12 Barred. Blocked number.
14 Insufficient funds Insufficient credit.
15 Reply Response received.
100 Unspecified Error Unspecified error.
101 Acknowledged Acknowledged.



Description of the errors


General API errors


General API errors
Code Description
E_CREDIT_EXPIRED Credit expired.
E_DENIED_IP The request is not accepted from the client's IP. Please contact Xminder's administrators.
E_KEY_DISABLED The value of the parameter key used in the request has been disabled. Please contact Xminder's administrators.
E_KEY_EMPTY The parameter key is missing from the request.
E_KEY_INVALID The value of the parameter key is invalid.
E_METHOD_INVALID Request to a module that does not exist in API.
E_NO_CREDIT Insufficient credit.
E_INTERNAL_X Internal error. Please contact Xminder's administrators and give them complete information about the error (E_INTERNAL_143, E_INTERNAL_345 or other).


API SMS errors


API SMS errors
Code Description
E_SMS_PARAM_FROM The parameter from is missing from the request.
E_SMS_PARAM_ID The parameter id is missing from the request.
E_SMS_PARAM_ID_INVALID The value of the parameter id is not valid.
E_SMS_PARAM_TEXT The parameter text is missing from the request.
E_SMS_PARAM_TO The parameter to is missing from the request.
E_SMS_PARAM_TO_INVALID The value of the parameter to must contain only digits. No space or other characters allowed.
E_SMS_INTERNAL_X Internal error of the module SMS. Please contact Xminder's administrators and give them complete information about the error (E_SMS_INTERNAL_121, E_SMS_INTERNAL_205 or other).



    ⇑ Top of page ⇐ Home    
Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox