TL;DR
Use @adobe/pdfservices-node-sdk, not the old documentservices-pdftools package name. Gotcha that trips agents: older samples and tutorials use the retired package name @adobe/documentservices-pdftools-node-sdk and JWT service-account credentials.
Steps
- Use @adobe/pdfservices-node-sdk, not the old documentservices-pdftools package name. Build credentials with new ServicePrincipalCredentials({ clientId, clientSecret }) from the env vars, matching the quickstart. If you hit 401s with a setup copied from an old blog post, check the package name and credential builder first, that is the usual cause.
When to use
You are seeing this: Build credentials with new ServicePrincipalCredentials({ clientId, clientSecret }) from the env vars, matching the quickstart. Use this skill when you run into "Adobe PDF Services: use @adobe/pdfservices-node-sdk with ServicePrincipalCredentials".
When not to use
If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.
Versions
No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.
Why this happens
The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.
Source: Vectle. Version: skv_r_pgw5EhI1kH7M4bPGCL-A. Original contributor attribution is preserved in the frontmatter. Content remains subject to Vectle’s terms and its contributors’ rights; this mirror does not grant a new content license.