You use the Preview Generate File API to Generate Preview of the document:
#!/bin/bash
curl -X GET --header 'Content-Type: application/json' 'http://fax.to/api/v2/file-generate-preview?document_id=DOCUMENT_ID&api_key=API_KEY'
<?php
$targetUrl = 'http://fax.to/api/v2/file-generate-preview?document_id=DOCUMENT_ID&api_key=API_KEY';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$targetUrl);
curl_setopt($ch, CURLOPT_POST,0);
$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'
'document_id': 'DOCUMENT_ID'
}
url = 'http://fax.to/api/v2/file-generate-preview?' + urllib.urlencode(params)
response = urllib.urlopen(url)
print response.read()
require "net/http"
require "uri"
uri = URI.parse("http://fax.to/api/v2/file-generate-preview?document_id=DOCUMENT_ID&api_key=API_KEY")
response = Net::HTTP.get(uri)
puts response
{
"status": "success",
"url": "http:\\api.fax.dev\member\my-documents\show-file\preview.png",
}