Account » Setting

Update your account settings.


Base URL


All requests to TheTexting must be submitted to the base URL. TheTexting provides you with an option of a response as a JSON object, or an XML string - you get to choose which response by selecting the appropriate base URL for your request.


JSON end point

https://www.thetexting.com/rest/sms/json

XML end point

https://www.thetexting.com/rest/sms/xml

HTTP Methods

All requests are submitted through the HTTP POST or GET method using UTF-8 encoding and URL encoded values.

Expected "Content-Type" for POST is "application/x-www-form-urlencoded", however we also support "application/json", "application/jsonrequest", "application/x-javascript", "text/json", "text/javascript", "text/x-javascript", "text/x-json" when posting parameters as a JSON object.


Parameters

All requests require your API credentials (api_key & api_secret), which you can find under "API Settings" in TheTexting Dashboard.

Parameter Description
api_key Required. Your API Key. Ex: api_key=2f0ihf5656lfu03jl
api_secret Required. Your API Secret. Ex: api_secret=cluol3434qwfc0lg
new_secret_key Optional. Your new API secret key.
new_in_callback_url_type Optional. Either 'HTTP' or 'HTTPS'.
new_in_callback_url Optional. Inbound call back URL without application protocol for e.g. www.example.com/in_callback.aspx
new_dr_callback_url_type Optional. Either 'HTTP' or 'HTTTPS'.
new_dr_callback_url Optional. Delivery call back URL without application protocol for e.g. www.example.com/dr_callback.aspx

Sample URL (POST)

https://www.thetexting.com/rest/sms/json/account/settings?api_key=12345&api_secret=123&new_secret_key=321&new_dr_callback_url_type=http&new_dr_callback_url=www.mytest.com&new_in_callback_url_type=http&new_in_callback_url=www.mytest.com

JSON Response (Success)

{

    "Response": {

        "secret_key": "321",

        "in_callback_url_type": "HTTP",

        "in_callback_url": www.mytest.com,

        "dr_callback_url_type": "HTTP",

        "dr_callback_url": www.mytest.com

    },

    "ErrorMessage": "",

    "Status": 0

}


XML Response (Success)

<TheTexting xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<ErrorMessage></ErrorMessage>
<Response xmlns:d2p1="http://schemas.datacontract.org/2004/07/RESTwebapi.Models">
<d2p1:dr_callback_url>www.mytest.com</d2p1:dr_callback_url>
<d2p1:dr_callback_url_type>HTTP</d2p1:dr_callback_url_type>
<d2p1:in_callback_url>www.mytest.com</d2p1:in_callback_url>
<d2p1:in_callback_url_type>HTTP</d2p1:in_callback_url_type>
<d2p1:secret_key>321</d2p1:secret_key>
</Response>
<Status>0</Status>
</TheTexting>


JSON Response (Failure)

{
"Response": null,
"ErrorMessage": "Parameters Missing",
"Status": 2
}


XML Response (Failure)

<TheTexting xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<ErrorMessage>Parameters Missing</ErrorMessage>
<Response i:nil="true"/>
<Status>2</Status>
</TheTexting>

Respond Codes

Code Meaning
0 Request is successful
1 Request has failed.
2 Parameters are missing.
3 Credentials are invalid.
4 Parameters are invalid.
5 Result has returned empty.
6 Status is invalid.

Callback Response

If you have set Incoming Reply callback URL under settings or with the number, we will send you the following parameters.


Sample URL

https://YOURCALLBACKURL.COM/YOURPAGE?from=123456&text=This is a test message.&datetime=Jun 9 2017 09:41 AM&cost=0.00

Parameter Description
From Sender number of this message.
Text Text of the incoming message received.
Date-time Date & Time when this message was received.
cost Cost of the message if any.