0
Tools API returning Invalid Credentials provided as argument
New Here
,
/t5/acrobat-services-api-discussions/tools-api-returning-invalid-credentials-provided-as-argument/td-p/11835513
Feb 16, 2021
Feb 16, 2021
Copy link to clipboard
Copied
I am building a web app running on localhost as my development environment, but the Tools APi keeps returning "Exception encountered while executing operation Error: Invalid Credentials provided as argument."
The sample code runs just fine using the exact same credentials code. This only occurs when running the Node.js Express server and attempting to access the Tools API.
Any help would be most appreciated. Code is below.
// Initial setup, create credentials instance.
const credentials = PDFToolsSdk.Credentials
.serviceAccountCredentialsBuilder()
.fromFile("pdftools-api-credentials.json")
.build();
console.log(credentials)
// Create an ExecutionContext using credentials and create a new operation instance.
const executionContext = PDFToolsSdk.ExecutionContext.create(credentials),
createPdfOperation = PDFToolsSdk.CreatePDF.Operation.createNew();
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Have something to add?
Join the conversation

