googleapis / google-api-php-client

A PHP client library for accessing Google APIs
Apache License 2.0
9.22k stars 3.52k forks source link

Error "Your default credentials were not found" only with Text-to-speech API #2482

Closed daext closed 11 months ago

daext commented 11 months ago

When I authenticate with an API Key or with OAuth the site in development generates the message below. I tried three API and this happens only with the Text-to-speech API. With the Google Sheets API and the Google Books APIs this doesn't happen.

Fatal error: Uncaught DomainException: Your default credentials were not found. To set up Application Default Credentials, see https://cloud.google.com/docs/authentication/external/set-up-adc

I can solve in the following two alternative methods:

Why Google Cloud is asking me to configure ADC if I have already provided this information during the authentication with PHP?

daext commented 11 months ago

Posted in the wrong library. Please close it. Thank you.