Google translate API v2 - (403) Access Not Configured
Asked Answered
H

2

6

i have problem with Google console API while using Google translate trough it. When i run the test from my local machine, it works great, but when i try to run it at my remote test virtual server it return that 403 above.

I am using Simple API access by Server key in console API access and my key is configured to both local and test machine IP addresses.

debug:

lynx --dump "checkip.dyndns.org";

- IP match with the one in my API key setup in google API console

curl -v "https://www.googleapis.com/language/translate/v2?q=hello&target=de&source=en&key=MYAPIKEY"

{
 "error": {
  "errors": [
   {
    "domain": "usageLimits",
    "reason": "accessNotConfigured",
    "message": "Access Not Configured"
   }
  ],
  "code": 403,
  "message": "Access Not Configured"
 }
}

Like i said, the same works at my local machine. API key is configured for both IPs in Google API console

UPDATE: when i used "Browser key" attached to url referrer instead of IP, it works. So the problem needs to be somehow in IP, but i cant get where. Any "whatsmyip" service confirms my IPs match.

Hines answered 8/8, 2012 at 20:34 Comment(2)
" remote is simply the same which iam connecting to via ssh." which may not be the ip being used to connect to the api.Amylase
Thank you Dagon - good point, i checked it right now, but IP match. I updated my question.Hines
P
6

i had the same problem but with the tasks api, turns out i hadn't enabled the 'task api' under the services tab at https://code.google.com/apis/console. Maybe you're having the same problem but with the 'translate api' not being enabled

Powered answered 18/10, 2012 at 15:37 Comment(1)
Like i said i successfully connected and used that service by the same code with the same credentials from local computer. Which means my translate service API switch is not the problem. I realy have it switched on.Hines
H
3

I tryed to find solution, but it seems to be a Google API bug. Only relevant support service i found was at Google Groups, where's more people with the same kind of problem, but i dont found any solution nor effort to check it from Google.

So here is workaround - Browser key which is not bound to IP, but http referer.

Check out this if You are using Google APIs Client Library for PHP.

Please note this is only temporary hack, not sollution. Browser keys are not bound to IP, so anyone can access Your API access if he know Your token. Connection is still via https.

Hines answered 14/8, 2012 at 15:3 Comment(2)
I have the same problem everytime I change IP and Google is not helping in any way. This is ridiculous and they are charging money for the usage. I guess this is the customer service you give when you are the big guy.Pallette
I am experiencing the same issue with the translation API. I switched servers and it ignores the new IP that I added. It's been 2 days and their service has still not propagated this new IP across their servers.Intelsat

© 2022 - 2024 — McMap. All rights reserved.