Setting GOOGLE_APPLICATION_CREDENTIALS in Meteor Cloud?

Hey all,

I’m working on my first Meteor Cloud project, and I’ve run into a small hiccup: specifically I’m using Google’s Speech-to-Text system capture audio. This works fine locally, in that I can do this:

export GOOGLE_APPLICATION_CREDENTIALS='path'

And it points to a JSON file with my credentials stored on my local. This works just fine. But when I deploy to Meteor Cloud, I can set the env variable in my settings file, but I’m not sure how to get the credentials json deployed. I’m hoping/imagining it’s a pretty straightforward issue, but what am I missing?

Thanks!

1 Like

Hi, the only way is specifying a path?

In some cases, you can load the JSON, and for that, Meteor has the Assets API.

But if the path is the only way that is not a blocker as well, if the file is already in the private folder, you can have your credentials in the settings file as

“GOOGLE_APPLICATION_CREDENTIALS”: “/app/bundle/programs/server/assets/app/googleappcreds.json”,

This entire path is the final location of files inside your project private folder.

If you have other questions, feel free to reach support@meteor.com as well.

2 Likes

Thanks so much for the response. That works!