Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Tools API returning Invalid Credentials provided as argument

New Here ,
Feb 16, 2021 Feb 16, 2021

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();
279
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
no replies

Have something to add?

Join the conversation
Resources