Skip to main content
Participant
November 25, 2023
Question

Getting ServiceApiError: Client ID is invalid for downloaded nodejs samples

  • November 25, 2023
  • 0 replies
  • 463 views

Hi, 

I'm trying to follow the documentation for PDF Extraction https://developer.adobe.com/document-services/docs/overview/pdf-extract-api/quickstarts/nodejs/

 

I created new credentials and downloaded sample code, also set PDF_SERVICES_CLIENT_ID and PDF_SERVICES_CLIENT_SECRET, but when I try to run extract-text-table-info-from-pdf.js it fails:

 

Logging configuration found at config/pdfservices-sdk-log4js-config.json.
2023-11-25T16:16:33.223:[INFO]: All validations successfully done. Beginning Extract Pdf operation execution
2023-11-25T16:16:33.225:[DEBUG]: Started file upload
2023-11-25T16:16:33.232:[DEBUG]: Resolved request uri : https://pdf-services.adobe.io/token
2023-11-25T16:16:33.819:[DEBUG]: Resolved request uri : https://pdf-services.adobe.io/assets
Exception encountered while executing operation ServiceApiError: Client ID is invalid

 

When I tried with CURL to get an API token, it worked:

curl -X POST 'https://ims-na1.adobelogin.com/ims/token/v3' -H 'Content-Type: application/x-www-form-urlencoded' -d 'grant_type=client_credentials&client_id=....&client_secret=....&scope=openid,AdobeID,DCAPI'
{"access_token":"....","token_type":"bearer","expires_in":86399}

 

This topic has been closed for replies.