-
API DOCUMENTATION
GETTING STARTED -
MESSAGES
- POSTSend a Message
-
NUMBER MANAGEMENT
- GETActive Numbers
- GETSearch Numbers
- POSTGet a Number
-
ACCOUNT
- GETGet Balance
-
TEST METHODS
- GETPing
-
CALLBACK EVENTS
- POSTInbound Message
- POSTDelivery Receipt
Ping/v1/ping
Description
Simple test method used to confirm connectivity with the TextPort API. A successful GET will return a response like: TextPort API alive at 2019-07-18 01:04:40 UTC
GET
Endpoint
https://api.textport.com/v1/ping
Request
GET /v1/ping HTTP/1.1
Host: api.textport.com
var client = new RestClient("http://api.textport.com/v1/ping");
var request = new RestRequest(Method.GET);
IRestResponse response = client.Execute(request);
$request = new HttpRequest();
$request->setUrl('https://api.textport.com/v1/ping');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
curl -X GET \
https://api.textport.com/v1/ping
var settings = {
"async": true,
"crossDomain": true,
"url": "https://api.textport.com/v1/ping",
"method": "GET"
}
$.ajax(settings).done(function (response) {
console.log(response);
});
import http.client
conn = http.client.HTTPConnection("api,textport,com")
payload = ""
headers = {
'cache-control': "no-cache"
}
conn.request("GET", "v1,ping", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
require 'uri'
require 'net/http'
url = URI("https://api.textport.com/v1/ping")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["cache-control"] = 'no-cache'
response = http.request(request)
puts response.read_body
Response
TextPort API alive at 2019-07-18 01:04:40 UTC