Account » Numbers

Get all numbers associated with your TheTexting account.


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

This API call uses GET method.


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

Sample URL

https://www.thetexting.com/rest/sms/json/account/numbers?api_key=your_api_Key&api_secret=your_api_secret

JSON Response (Success)

{

    "Response": {

        "number_count": 1,

        "list_account_numbers": [

            {

                "country_code": "US ",

                "Number": "1234567890",

                "in_callback_url_type": null,

                "in_callback_url": null

            }

        ]

    },

    "ErrorMessage": "",

    "Status": 0

}


XML Response (Success)

<TheTexting xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<ErrorMessage/>
<Response>
<list_account_numbers xmlns:d3p1="http://schemas.datacontract.org/2004/07/RESTwebapi.Models">
<d3p1:Number>
<d3p1:Number>16787188834</d3p1:Number>
<d3p1:country_code>US</d3p1:country_code>
<d3p1:in_callback_url i:nil="true"/>
<d3p1:in_callback_url_type i:nil="true"/>
</d3p1:Number>
</list_account_numbers>
<number_count>1</number_count>
</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.