Google Translate API Text Translation: Forbidden HTTP Requests

I am making a language learning web application that when you hover over a word, pronounces it for you. I would like to access native speaker translation from the Google Translate API.

I found this resource that gives http://translate.google.com/translate_ttsas the base URL tlfor both the target language and the qquery string.

This works amazingly when I just open it in a browser, http://translate.google.com/translate_tts?tl=zh-CN&q = 你好, but any httprequests for my application return a 403 Forbidden error.

localhost: ~ me $ wget " http://translate.google.com/translate_tts?ie=UTF-8&tl=en&q=hello+world " --2015-06-02 11: 02: 06-- http: // translate .google.com / translate_tts? ie = UTF-8 & tl = en & q = hello + world Fix translate.google.com ... 173.194.123.38, 173.194.123.36, 173.194.123.32, ... Connect to translate.google.com | 173.194.123.38 |: 80 ... connected. An HTTP request was sent, waiting for a response ... 403 Forbidden 2015-06-02 11:02:07 ERROR 403: Forbidden.

Is there an official Google text-to-speech API associated with their payment plans for the regular Google Translate API that I just can't find? Or is there a way to getreproduce this sound in some way?

+4
2

. Google translate api. API. Api V2.

api 403 .

: https://cloud.google.com/translate/docs

+3

All Articles