Get Files API

To use the Get Files API:

  1. Create a request and get list of files:
    #!/bin/bash
    curl -X GET --header 'Content-Type: application/json' 'https://fax.to/api/v2/files?api_key=API_KEY'
    
    <?php
    
    $defaults = [
      CURLOPT_URL => 'https://fax.to/api/v2/files?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/files?' + urllib.urlencode(params)
    response = urllib.urlopen(url)
    print response.read()
    
    require "net/http"
    require "uri"
    
    uri = URI.parse("https://fax.to/api/v2/files?api_key=API_KEY")
    
    response = Net::HTTP.get(uri)
    
    puts response
    
    
    // Sample Output.
    [
      {
        "id": 2,
        "filename": "faxto.pdf",
        "pages": 1,
        "size": 39942,
        "uploaded": "2017-03-10"
      },
      .....