Retrieve Ping Data
curl --request GET \
--url https://cert.trustedform.com/{cert_id}/ping \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://cert.trustedform.com/{cert_id}/ping"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://cert.trustedform.com/{cert_id}/ping', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://cert.trustedform.com/{cert_id}/ping",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://cert.trustedform.com/{cert_id}/ping"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://cert.trustedform.com/{cert_id}/ping")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://cert.trustedform.com/{cert_id}/ping")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body{
"age": 123,
"client": {
"ip": "<string>",
"user_agent": "<string>",
"dimensions": {
"screen": {
"width": 123,
"height": 123
},
"window": {
"width": 123,
"height": 123
}
},
"geo": {
"city": "<string>",
"country": "<string>",
"postal_code": "<string>",
"subdivisions": [
"<string>"
]
}
},
"created_at": "2023-11-07T05:31:56Z",
"location": {
"framed": true,
"parent_url": "<string>",
"url": "<string>"
},
"time_on_page": 123,
"type": "<string>"
}{
"message": "Malformed certificate id",
"outcome": "error"
}{
"message": "Unauthorized",
"outcome": "error"
}{
"message": "TrustedForm certificate has expired or could not be found",
"outcome": "error"
}Ping
Retrieve Ping Data
deprecated
Retrieve ping data directly from a Certificate.
When a lead vendor only provides a TrustedForm Certificate URL,
Ping data can be retrieved directly without a Ping URL. Simply
append /ping to the Certificate URL and perform an authenticated
GET.
A certificate’s Ping data can be accessed two ways:
- Querying a modified TrustedForm Certificate URL
- Querying a vendor-provided TrustedForm Ping URL
GET
/
{cert_id}
/
ping
Retrieve Ping Data
curl --request GET \
--url https://cert.trustedform.com/{cert_id}/ping \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://cert.trustedform.com/{cert_id}/ping"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://cert.trustedform.com/{cert_id}/ping', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://cert.trustedform.com/{cert_id}/ping",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://cert.trustedform.com/{cert_id}/ping"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://cert.trustedform.com/{cert_id}/ping")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://cert.trustedform.com/{cert_id}/ping")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body{
"age": 123,
"client": {
"ip": "<string>",
"user_agent": "<string>",
"dimensions": {
"screen": {
"width": 123,
"height": 123
},
"window": {
"width": 123,
"height": 123
}
},
"geo": {
"city": "<string>",
"country": "<string>",
"postal_code": "<string>",
"subdivisions": [
"<string>"
]
}
},
"created_at": "2023-11-07T05:31:56Z",
"location": {
"framed": true,
"parent_url": "<string>",
"url": "<string>"
},
"time_on_page": 123,
"type": "<string>"
}{
"message": "Malformed certificate id",
"outcome": "error"
}{
"message": "Unauthorized",
"outcome": "error"
}{
"message": "TrustedForm certificate has expired or could not be found",
"outcome": "error"
}Authorizations
TrustedForm uses HTTP Basic Authentication with the username API and your API key as the password.
For example: API:1f1b96c9150d8050e858c043d543bb4eadae0e6f
Response
Ping Data