This method allows you to retrieve the list of incoming faxes for a specific recipient.
#!/bin/bash
curl -X GET --header 'Content-Type: application/json' 'https://fax.to/api/v2/incoming-faxes/{recipient}?api_key=API_KEY'
<?php
$defaults = [
CURLOPT_URL => 'https://fax.to/api/v2/incoming-faxes/{recipient}?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/incoming-faxes/{recipient}?' + urllib.urlencode(params)
response = urllib.urlopen(url)
print response.read()
require "net/http"
require "uri"
uri = URI.parse("https://fax.to/api/v2/incoming-faxes/{recipient}?api_key=API_KEY")
response = Net::HTTP.get(uri)
puts response
// Sample Output.
{
"status": "success",
"inbox": [
{
"id": 775,
"did_id": 7745147,
"filename": "597ef3a78a2dd.pdf",
"filesize": "120.45 KB",
"number": "+918111922344",
"sender": "919245657633",
"total_pages": 5,
"created_at": {
"date": "2017-08-01 00:00:00.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"preview_file": "https://fax.to/receivefax/api/v1/inbox/4/preview?api_key=abd1ebe0-62d5-11e7-91c7-8590f436fefa",
"file_url": "https://fax.to/receivefax/api/v1/inbox/4/file?api_key=abd1ebe0-62d5-11e7-91c7-8590f436fefa"
},
{
"id": 776,
"did_id": 7745147,
"filename": "597ef3a78a2dd.pdf",
"filesize": "120.45 KB",
"number": "+918111922344",
"sender": "919245657633",
"total_pages": 5,
"created_at": {
"date": "2017-08-01 00:00:00.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"preview_file": "https://fax.to/receivefax/api/v1/inbox/4/preview?api_key=abd1ebe0-62d5-11e7-91c7-8590f436fefa",
"file_url": "https://fax.to/receivefax/api/v1/inbox/4/file?api_key=abd1ebe0-62d5-11e7-91c7-8590f436fefa"
}
],
"meta": {
"pagination": {
"total": 7,
"count": 2,
"per_page": 2,
"current_page": 2,
"total_pages": 4,
"links": {
"previous": "https://fax.to/api/v2/incoming-faxes/918111922311?page=1",
"next": "https://fax.to/api/v2/incoming-faxes/918111922311?page=3"
}
}
}
}