Hi, Did you found solution? if not the let me know i can help you to solve it.
How to set path to Google API credentials.json file in .ENV?
I got a json file from a Google API service account thats in the root folder. The environment variable was set with full path to the file like so:
GOOGLE_APPLICATION_CREDENTIALS="C:/Users/marod/Desktop/text2speech/tapp/credentials.json"
It worked fine for now. But I know when I push to production it won't find the file.
So I tried doing it like:
GOOGLE_APPLICATION_CREDENTIALS="/tapp/credentials.json"
but it just gives error message:
"Google\ApiCore\ValidationException Could not construct ApplicationDefaultCredentials"
Is their better way to reference this file so that it always locates the json file even in production?
Any help would be appreciated.
Please or to participate in this conversation.