Provides a real time status and validity check & carrier information of a phone number.
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.
Request
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 |
to | Required. Number whose details are required. |
Response
Following parameters will be returned in the response body.
Parameter | Type | Detail | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Response | object |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ErrorMessage | string | Detailed description of error, if any. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Status | int | Response code for the query. |
Sample Request URL (GET)
https://www.thetexting.com/rest/sms/json/number/lookup?api_key=your_api_Key&api_secret=your_api_secret&to=19142059159
JSON Response (Success)
{
"Response": {
"international_format_number": "+19142059159",
"national_format_number": "(914) 205-9159",
"phone_number_iso2_code": "US",
"phone_number_type": "fixed line",
"mccmnc": null,
"serving_msc": null,
"imsi": null,
"original_carrier": {
"carrier_name": "TELENGY L.L.C. - NY",
"carrier_prefix": null,
"carrier_country_name": "United States",
"carrier_country_prefix": null
},
"is_ported": null,
"ported_carrier": null,
"is_roaming": null,
"roaming_carrier": null,
"lookup_status": "No Error"
},
"ErrorMessage": "",
"Status": 0
}
JSON Response (Failure)
{
"Response": null,
"ErrorMessage": "Lookup Failed. Contact support.",
"Status": 1
}
Respond Codes
Code | Meaning |
---|---|
0 | Request is successful |
1 | Request has failed. ErrorMessage is returned for detailed description of error. |
2 | Parameters are missing. |
3 | Credentials are invalid. |
4 | Parameters are invalid. |
5 | Result has returned empty. |
6 | Status is invalid. |