nodejs-translate icon indicating copy to clipboard operation
nodejs-translate copied to clipboard

Use API Key instead of service account

Open cesarvarela opened this issue 4 years ago • 1 comments

Hi, I would like to avoid setting up a Service Account and use an API Key instead.

Is it possible?

Thanks.

cesarvarela avatar Nov 29 '21 22:11 cesarvarela

This works:

const translate = new Translate({key: process.env.GOOGLE_API_KEY });
``

Nevertheless, the docs kind of push you to use a service account. Adding a note or something to point out that this is possible wouldn't hurt. I had to search on this repo's source to find it.

cesarvarela avatar Nov 29 '21 23:11 cesarvarela

Closing for now, as this seems to be resolved. Thank you!

sofisl avatar Nov 10 '22 21:11 sofisl