Need suggestion regarding translate API

60 views
Skip to first unread message

Mayank Goyal

unread,
Feb 23, 2021, 3:12:14 AM2/23/21
to Google Cloud Translation API
Hi, I was reading documentation for translate API and have a question on the same.
For authentication of basic translate API, :- 
We either use API key or Service account. I know API key is straight forward, however please suggest with service account is there a way to authenticate without using client Library (like via a direct Rest API call and get token or something) or is it mandatory to use client library and pass Json file with service account details to it and also consume actual API via client library only.

If I have to use translate API with service account authentication with Postman, how will we use it?

rmir

unread,
Feb 24, 2021, 5:32:24 AM2/24/21
to Google Cloud Translation API

If you do not want to use a client library, you should be able to authenticate the REST calls [1] by using the environment variable `GOOGLE_APPLICATION_CREDENTIALS` [2]. 

I am not familiar with Postman requirements, so let us know if the above solution would work for you or if you need a different approach to authenticate. 

---

[1] https://cloud.google.com/translate/docs/basic/quickstart#translate_text_example 

[2] https://cloud.google.com/docs/authentication/production#passing_variable   

Reply all
Reply to author
Forward
0 new messages