Skip to main content
Participant
July 13, 2023
Question

I am trying to use the ExtractTextInfroFromPdf Abode PDF API but am receiving authentication errors

  • July 13, 2023
  • 1 reply
  • 518 views

Hi Guys, 

I am trying to run the ExtractTextInfoFromPdf file that is part Adobe Pdf API, but I am reciving the following error: 

ERROR ExtractTextInfoFromPDF.Program - Exception encountered while executing operation
System.ArgumentException: The ClientId field is required.;The ClientSecret field is required.
at Adobe.PDFServicesSDK.auth.Credentials.Validate()
at Adobe.PDFServicesSDK.auth.ServicePrincipalCredentials..ctor(String clientId, String clientSecret)
at Adobe.PDFServicesSDK.auth.ServicePrincipalCredentials.Builder.Build()
at ExtractTextInfoFromPDF.Program.Main()

 

The thing though is that I did put my client Id and clientSecret id in the code through these lines  .WithClientId(Environment.GetEnvironmentVariable("sssss"))
.WithClientSecret(Environment.GetEnvironmentVariablessssss"))

Additionally, I ran the 

set PDF_SERVICES_CLIENT_ID=<YOUR CLIENT ID>
set PDF_SERVICES_CLIENT_SECRET=<YOUR CLIENT SECRET>

commands with my given client id and client secret values. I am still facing this issue. Does anyone know how I can fix this issue. 

This topic has been closed for replies.

1 reply

Raymond Camden
Community Manager
Community Manager
July 13, 2023

I assume if you print the env var in your code, it shows up right?

Participant
July 18, 2023

yes i am

Raymond Camden
Community Manager
Community Manager
July 18, 2023

I'm confused. So you have a value for Environment.GetEnvironmentVariable("sssss"), but the SDK says you didn't pass it? Maybe you can share your complete code?