translate / pootle

Online translation tool
http://pootle.translatehouse.org
GNU General Public License v3.0
1.48k stars 287 forks source link

Google Translate API server mode #3340

Open kklem0 opened 9 years ago

kklem0 commented 9 years ago

Google Translate API has server mode and browser mode, the current implementation is the browser mode which exposed API KEY to end user and it can be misuse quite easily like just faking HTTP referer. It would be better if pootle can make a wrapper so it can use server mode instead, which is IP address restricted so we won't leak our API KEY and can't be used if it is leaked.

unho commented 9 years ago

@clementhk I have googled for that mode and found nothing. Also looked at https://cloud.google.com/translate/docs and I found no references to the modes. Can you please provide some documentation we can read?

kklem0 commented 9 years ago

qq20141117-1 It's easier to look at https://console.developers.google.com/project/xxx/apiui/credential page. We are obviously using "Browser Application" now as it checks for browsers' referers.