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"
}Retrieve Ping Data
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
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
Path Parameters
Certificate ID
Response
Ping Data
Lead Age, in milliseconds. (The time elapsed between the final recorded interaction event and the call to this API)
Information about the user's device and browser.
Show child attributes
Show child attributes
When the certificate was issued, in ISO8601 format.
Information about the page's location.
Show child attributes
Show child attributes
The amount of time the user spent interacting with the page, in milliseconds.
(The time elapsed between created_at and the final recorded interaction event)
The type of certificate associated with this response. Possible values are limited to "standard", "masked", or "facebook".