Hello,

I am trying to write a very simple web app to translate French to
English. But I got stalled pretty quickly while writing my app because
the Language API returned nothing but "400 Bad Request".

Here is the URL I am calling (and some sample code):

        url = "http://ajax.googleapis.com/ajax/services/language/translate?
v=1.0&q=bonjour&langpair=fr|en&key=(my key here)"

        xml.Open "GET", url, False
        xml.setRequestHeader "Referer", "http://www.uer.ca/";
        xml.Send()

        result = xml.responsetext


Note that for the purposes of testing, I've hard-coded the string
"bonjour".

The Google server invariably returns this:

Bad Request
Error 400

I've tried changing or omitting the referer header, I've tried
removing or changing my key, I've tried different language pairs and
different blocks of text. I even ran the code on my server in case my
home IP was blocked for some reason. No matter what, the error is the
same.

Even when I click on some of the examples in the API documentation
page -- the first click works, but if I change the URL (to change the
word being translated, for example), it gives me the 400 error. I've
tried other browsers and other computers.

I'm at a loss. Either I'm doing it wrong, or I've been banned for
abuse (???)...

Can anyone help?
Thanks!

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google AJAX API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-AJAX-Search-API?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to