Get File
curl --request GET \
--url https://{gatewayBaseURL}/files/{id} \
--header 'Authorization: Bearer <token>' \
--header 'x-tfy-provider-name: <x-tfy-provider-name>'import requests
url = "https://{gatewayBaseURL}/files/{id}"
headers = {
"x-tfy-provider-name": "<x-tfy-provider-name>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {
'x-tfy-provider-name': '<x-tfy-provider-name>',
Authorization: 'Bearer <token>'
}
};
fetch('https://{gatewayBaseURL}/files/{id}', 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://{gatewayBaseURL}/files/{id}",
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: Bearer <token>",
"x-tfy-provider-name: <x-tfy-provider-name>"
],
]);
$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://{gatewayBaseURL}/files/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-tfy-provider-name", "<x-tfy-provider-name>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{gatewayBaseURL}/files/{id}")
.header("x-tfy-provider-name", "<x-tfy-provider-name>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{gatewayBaseURL}/files/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-tfy-provider-name"] = '<x-tfy-provider-name>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"object": "<string>",
"created_at": 123,
"purpose": "<string>",
"bytes": 123,
"status": "<string>"
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"param": "<string>"
},
"status": "failure",
"message": "<string>",
"error_origin_level": "authentication"
}Files
Get File
Get information about a specific file
GET
/
files
/
{id}
Get File
curl --request GET \
--url https://{gatewayBaseURL}/files/{id} \
--header 'Authorization: Bearer <token>' \
--header 'x-tfy-provider-name: <x-tfy-provider-name>'import requests
url = "https://{gatewayBaseURL}/files/{id}"
headers = {
"x-tfy-provider-name": "<x-tfy-provider-name>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {
'x-tfy-provider-name': '<x-tfy-provider-name>',
Authorization: 'Bearer <token>'
}
};
fetch('https://{gatewayBaseURL}/files/{id}', 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://{gatewayBaseURL}/files/{id}",
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: Bearer <token>",
"x-tfy-provider-name: <x-tfy-provider-name>"
],
]);
$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://{gatewayBaseURL}/files/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-tfy-provider-name", "<x-tfy-provider-name>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{gatewayBaseURL}/files/{id}")
.header("x-tfy-provider-name", "<x-tfy-provider-name>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{gatewayBaseURL}/files/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-tfy-provider-name"] = '<x-tfy-provider-name>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"object": "<string>",
"created_at": 123,
"purpose": "<string>",
"bytes": 123,
"status": "<string>"
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"param": "<string>"
},
"status": "failure",
"message": "<string>",
"error_origin_level": "authentication"
}Authorizations
Headers
Response
File retrieved successfully.
Was this page helpful?