October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PCOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk4 min

PDFShift API Authentication Error 401: How to Fix It

PDFShift now expects the API key in the X-API-Key header. Test it against the credits-usage endpoint before troubleshooting the conversion request.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

PDFShift’s current API authentication method is the X-API-Key request header. Add your API key there, then test it with a GET request to the credits-usage endpoint before retrying the PDF conversion. PDFShift says it replaced its older Basic Auth method on May 6, 2025; requests with missing or incorrectly sent authentication may return 401 or 403, depending on how the key was sent. PDFShift Help Center

1. Send the API key in the current header

Set a request header named X-API-Key and use your PDFShift API key as its value. If your request only uses the older Basic Auth configuration, replace that authentication method with the header. PDFShift states that the migration to X-API-Key took effect on May 6, 2025. The provider says missing or incorrectly sent authentication can result in either 401 or 403; it does not publish a precise cause-to-status mapping.

Python: test authentication, then convert

This example first checks authentication at the usage endpoint. If that succeeds, it submits a separate conversion request.

import requests

api_key = "YOUR_API_KEY"

check = requests.get(
    "https://api.pdfshift.io/v3/credits/usage",
    headers={"X-API-Key": api_key},
)
print("Usage check:", check.status_code, check.text)

response = requests.post(
    "https://api.pdfshift.io/v3/convert/pdf",
    headers={"X-API-Key": api_key},
    json={"source": "https://example.com"},
)
print("Conversion:", response.status_code, response.text)

PDFShift’s Python guide demonstrates the conversion request and header; its Help Center describes the GET usage check. See the Python requests guide and usage diagnostic instructions.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
PDF Converter Ultimate - Convert PDF files into Word, Excel, PowerPoint and others - PDF converter software with OCR recognition compatible with Windows 11 / 10 / 8.1 / 8 / 7
  • Convert your PDF files into Word, Excel & Co. the easy way
  • Convert scanned documents thanks to our new 2022 OCR technology
  • Adjustable conversion settings
  • No subscription! Lifetime license!
  • Compatible with Windows 11, 10, 8.1, 7 - Internet connection required

Node.js: conversion request

PDFShift’s Node guide shows the conversion request with the key in the header:

const apiKey = "YOUR_API_KEY";
const response = await fetch(
  "https://api.pdfshift.io/v3/convert/pdf",
  {
    method: "post",
    headers: {
      "X-API-Key": apiKey,
      "Content-Type": "application/json",
    },
    body: JSON.stringify({ source: "https://example.com" }),
  }
);

console.log(response.status, await response.text());

For the provider’s example and language-specific context, see the PDFShift NodeFetch guide.

Rank #2
Doxillion Free Document Converter – Converts DOCX, DOC, PDF, WPS and Many More Files Quickly [Download]
  • Convert over 50 document file formats.
  • Preview your files from Doxillion before converting them.
  • Use batch conversion to convert thousands of files at once.
  • Enjoy an easy-to-use, intuitive interface with a Drag and Drop file option.
  • Burn your converted or original files directly to disc.

cURL: isolate the usage check

Use the same header with the diagnostic endpoint to verify whether the key is being accepted:

curl -i "https://api.pdfshift.io/v3/credits/usage" 
  -H "X-API-Key: YOUR_API_KEY"

2. Read the usage-check response

Send a GET request to https://api.pdfshift.io/v3/credits/usage using the same X-API-Key value you intend to use for conversion. PDFShift says an authenticated response contains JSON with usage and available-credit data. If authentication is not accepted, it may return 401 or 403; the provider does not specify an exact mapping between those statuses and particular mistakes.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
PDF Extra Ultimate | Complete PDF Reader and Editor | Create, Edit, Convert, Combine, Comment, Fill & Sign PDFs | Yearly License | 1 Windows PC & 2 Mobile Devices | 1 User
  • EDIT text, images & designs in PDF documents. ORGANIZE PDFs. Convert PDFs to Word, Excel & ePub.
  • READ and Comment PDFs – Intuitive reading modes & document commenting and mark up.
  • CREATE, COMBINE, SCAN and COMPRESS PDFs
  • FILL forms & Digitally Sign PDFs. PROTECT and Encrypt PDFs
  • 1 Year License for 1 Windows & 2 Mobile (Android and/or iOS) devices.
  • Usage and available-credit data is returned: the diagnostic confirms that this request’s authentication was accepted. Retry the conversion separately with the same header.
  • The usage request returns 401 or 403: check that the outgoing request actually includes the header spelled X-API-Key and that its value is your API key. Remove a Basic Auth-only setup.
  • The usage check succeeds but conversion does not: inspect the conversion response and request independently. A successful authentication check does not establish that every conversion failure is an authentication problem.

3. Check workflow and client configuration

n8n

In an n8n HTTP Request step, use the conversion URL https://api.pdfshift.io/v3/convert/pdf and the POST method. Leave the authentication selector at None, then add X-API-Key with the API key as a request header. The PDFShift integration guide documents this setup: Integrate PDFShift into your n8n workflow.

Other HTTP clients

  • Confirm the header is configured as a request header, not as a query parameter or a field in the JSON body.
  • Check the actual outgoing request if your client has a request inspector or execution log; a header entered in the wrong configuration panel may not be sent.
  • When moving from Basic Auth, remove the old method if it is the only authentication being sent, and configure X-API-Key instead.

4. Troubleshoot based on what fails

Symptom What to check Next step
Usage check returns 401 or 403 Whether the request carries X-API-Key with the key as its value; whether the client is still using only Basic Auth. Correct the header and repeat the GET usage check. PDFShift does not publish a definitive mapping of individual mistakes to 401 versus 403.
Usage check returns usage and available-credit JSON, but conversion fails The conversion request and its response, separately from authentication. Retry the POST to https://api.pdfshift.io/v3/convert/pdf with the same header and inspect the returned status and body. The available provider guidance does not establish that this is still an authentication failure.
Workflow request fails while a direct request works The workflow’s HTTP method, URL, authentication selector, and request-header configuration. For n8n, set POST, use the conversion URL, keep authentication at None, and send X-API-Key as a header.

The provider sources cited here do not establish key revocation, rotation, or dashboard lifecycle behavior as the cause of a particular 401. Avoid assuming one of those explanations without evidence from the response or your account.

Rank #4
PDF Extra Lifetime - Professional PDF Editor - Best Adobe Acrobat Pro Alternative - Lifetime License for Windows PC
  • Perfect Adobe Acrobat Pro alternative – lifetime license for Windows 10 and 11.
  • EDIT text, images, pages, hyperlinks, designs in PDF documents. ORGANIZE PDFs.
  • READ and Comment on PDFs – Intuitive reading modes & document commenting and mark up tools!
  • CREATE, COMBINE, SCAN and COMPRESS PDFs.
  • FILL forms & Digitally Sign PDFs. Work with Digital certificates
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Or skip the browser setup

If your goal is to capture a web page as an image or PDF rather than convert HTML through PDFShift, ScreenshotNeo offers a one-request screenshot API. Replace the example URL with the page you want to capture:

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

See the ScreenshotNeo API documentation for request options. It accepts cookie and consent banners before capture and removes more than 60 known consent platforms, newsletter popups, and chat widgets; each step can be turned off. Bot checks, blank pages, timeouts, failed loads, and cache hits cost nothing, and responses indicate the page verdict and billing status. An MCP server provides take_screenshot, get_page_info, and capture_pdf tools for AI agents. The Free plan includes 1,000 shots per month with no card; paid plans start at $5 for 3,000.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Sign up for ScreenshotNeo’s free plan: 1,000 screenshots a month, no card required.

Quick Recap

Bestseller No. 1
PDF Converter Ultimate - Convert PDF files into Word, Excel, PowerPoint and others - PDF converter software with OCR recognition compatible with Windows 11 / 10 / 8.1 / 8 / 7
PDF Converter Ultimate - Convert PDF files into Word, Excel, PowerPoint and others - PDF converter software with OCR recognition compatible with Windows 11 / 10 / 8.1 / 8 / 7
Convert your PDF files into Word, Excel & Co. the easy way; Convert scanned documents thanks to our new 2022 OCR technology
Bestseller No. 2
Doxillion Free Document Converter – Converts DOCX, DOC, PDF, WPS and Many More Files Quickly [Download]
Doxillion Free Document Converter – Converts DOCX, DOC, PDF, WPS and Many More Files Quickly [Download]
Convert over 50 document file formats.; Preview your files from Doxillion before converting them.
Bestseller No. 3
PDF Extra Ultimate | Complete PDF Reader and Editor | Create, Edit, Convert, Combine, Comment, Fill & Sign PDFs | Yearly License | 1 Windows PC & 2 Mobile Devices | 1 User
PDF Extra Ultimate | Complete PDF Reader and Editor | Create, Edit, Convert, Combine, Comment, Fill & Sign PDFs | Yearly License | 1 Windows PC & 2 Mobile Devices | 1 User
READ and Comment PDFs – Intuitive reading modes & document commenting and mark up.; CREATE, COMBINE, SCAN and COMPRESS PDFs
$83.88
Bestseller No. 4
PDF Extra Lifetime - Professional PDF Editor - Best Adobe Acrobat Pro Alternative - Lifetime License for Windows PC
PDF Extra Lifetime - Professional PDF Editor - Best Adobe Acrobat Pro Alternative - Lifetime License for Windows PC
Perfect Adobe Acrobat Pro alternative – lifetime license for Windows 10 and 11.; EDIT text, images, pages, hyperlinks, designs in PDF documents. ORGANIZE PDFs.
$99.99
Bestseller No. 5
Doxillion Free Document Converter for Mac – Converts DOCX, DOC, PDF, WPS and Many More Files Quickly [Download]
Doxillion Free Document Converter for Mac – Converts DOCX, DOC, PDF, WPS and Many More Files Quickly [Download]
Convert over 50 document file formats.; Preview your files from Doxillion before converting them.
Best Value
Doxillion Free Document Converter for Mac – Converts DOCX, DOC, PDF, WPS and Many More Files Quickly [Download]
  • Convert over 50 document file formats.
  • Preview your files from Doxillion before converting them.
  • Use batch conversion to convert thousands of files at once.
  • Enjoy an easy-to-use, intuitive interface with a Drag and Drop file option.
  • Burn your converted or original files directly to disc.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. Shenzhen desk3 min
    HONOR Expands Beyond Smartphones With Humanoid Robot RevealHONOR said it unveiled its first humanoid robot at MWC 2026 and named shopping assistance, workplace inspections, and supportive companionship as intended uses. Later Robotics D1 claims and a reported…
  2. Cupertino desk5 min
    Apple Unveils AirPods Max 2: The Upgrade That Should Have Happened Years AgoAirPods Max 2 adds H2-powered audio features and Apple claims up to 1.5× more effective ANC, but its design, Smart Case, and 20-hour battery rating are unchanged. Wired lossless audio…
  3. Cupertino desk4 min
    Apple’s OLED Touch MacBooks Are Coming—but the Dynamic Island Is the Real GambleApple has not announced an OLED touchscreen MacBook, but reports point to high-end models arriving in late 2026 or early 2027. The reported Mac Dynamic Island could be useful, but…
Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.