To use the Fax History API:
#!/bin/bash
curl -X GET --header 'Content-Type: application/json' 'https://fax.to/api/v2/fax-history?api_key=API_KEY'
<?php
$defaults = [
CURLOPT_URL => 'https://fax.to/api/v2/fax-history?api_key=API_KEY'
];
$ch = curl_init();
curl_setopt_array($ch, $defaults);
$response = curl_exec($ch);
// Decode the json object you retrieved when you ran the request.
$decodedResponse = json_decode($response, true);
var_dump($decodedResponse);
import urllib
params = {
'api_key': 'API_KEY'
}
url = 'https://fax.to/api/v2/fax-history?' + urllib.urlencode(params)
response = urllib.urlopen(url)
print response.read()
require "net/http"
require "uri"
uri = URI.parse("https://fax.to/api/v2/fax-history?api_key=API_KEY")
response = Net::HTTP.get(uri)
puts response
// Sample Output.
{
"status": "success",
"history": [
{
"id": 92334,
"created": {
"date": "2017-03-09 15:35:28.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"document_id": 112601,
"document": "FAX11920.pdf",
"recipient": "441224459292",
"status": "success"
},
.....