Account details
import requests
url = "https://api.pdfshift.io/v3/account"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.pdfshift.io/v3/account', 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://api.pdfshift.io/v3/account",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}require 'uri'
require 'net/http'
url = URI("https://api.pdfshift.io/v3/account")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_bodypackage main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.pdfshift.io/v3/account"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}using RestSharp;
var options = new RestClientOptions("https://api.pdfshift.io/v3/account");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("X-API-Key", "<api-key>");
var response = await client.GetAsync(request);
Console.WriteLine("{0}", response.Content);
HttpResponse<String> response = Unirest.get("https://api.pdfshift.io/v3/account")
.header("X-API-Key", "<api-key>")
.asString();curl --request GET \
--url https://api.pdfshift.io/v3/account \
--header 'X-API-Key: <api-key>'{
"success": true,
"account": {
"name": "Richard Hendricks",
"firstname": "Richard",
"email": "richard@piedpiper.com",
"created": 1526561399000,
"company_name": "PiedPiper",
"company_details": "Hacker Hostel,\n5230 Newell Road,\nPalo Alto, CA 94303",
"company_vat": null,
"country": "US",
"renew_date": 1763683200000,
"avatar": "https://secure.gravatar.com/avatar/584ac79c82c64934d475251b46f78f4a?d=mm&s=96",
"billing_email": "jared@piedpiper.com",
"plan": {
"display": "Business",
"name": "business",
"credits": 50000,
"filesize": 1250,
"timeout": 100,
"price": 99,
"yearly": false,
"overage": 20
},
"hard_limit": null,
"subscription_ends_at": null
}
}{
"success": true,
"error": "<string>",
"code": 123
}{
"success": true,
"error": "<string>",
"code": 123
}{
"success": true,
"error": "<string>",
"code": 123
}Account
Account details
Returns the account details for the connected API Key
GET
/
account
Account details
import requests
url = "https://api.pdfshift.io/v3/account"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.pdfshift.io/v3/account', 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://api.pdfshift.io/v3/account",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}require 'uri'
require 'net/http'
url = URI("https://api.pdfshift.io/v3/account")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_bodypackage main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.pdfshift.io/v3/account"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}using RestSharp;
var options = new RestClientOptions("https://api.pdfshift.io/v3/account");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("X-API-Key", "<api-key>");
var response = await client.GetAsync(request);
Console.WriteLine("{0}", response.Content);
HttpResponse<String> response = Unirest.get("https://api.pdfshift.io/v3/account")
.header("X-API-Key", "<api-key>")
.asString();curl --request GET \
--url https://api.pdfshift.io/v3/account \
--header 'X-API-Key: <api-key>'{
"success": true,
"account": {
"name": "Richard Hendricks",
"firstname": "Richard",
"email": "richard@piedpiper.com",
"created": 1526561399000,
"company_name": "PiedPiper",
"company_details": "Hacker Hostel,\n5230 Newell Road,\nPalo Alto, CA 94303",
"company_vat": null,
"country": "US",
"renew_date": 1763683200000,
"avatar": "https://secure.gravatar.com/avatar/584ac79c82c64934d475251b46f78f4a?d=mm&s=96",
"billing_email": "jared@piedpiper.com",
"plan": {
"display": "Business",
"name": "business",
"credits": 50000,
"filesize": 1250,
"timeout": 100,
"price": 99,
"yearly": false,
"overage": 20
},
"hard_limit": null,
"subscription_ends_at": null
}
}{
"success": true,
"error": "<string>",
"code": 123
}{
"success": true,
"error": "<string>",
"code": 123
}{
"success": true,
"error": "<string>",
"code": 123
}Authorizations
⌘I