Error 403

366 views
Skip to first unread message

Mohammad Kandil

unread,
May 21, 2012, 6:03:10 PM5/21/12
to google-tra...@googlegroups.com
Hello All,

We're getting the below error,

We have tried:

  • Disable/enable billing
  • Create new api key (browser then server then browser again)
  • We have tried without API key and it works but of course it's throttled

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

The code is well tested, it's from a wordpress plugin, we need to translate and store a copy of our site for indexing for our non English speaking visitors

Mohammad Kandil

unread,
May 21, 2012, 6:07:58 PM5/21/12
to google-tra...@googlegroups.com
It would also seem I also need to include my project id 931456084485

João André Martins

unread,
May 22, 2012, 9:34:59 AM5/22/12
to google-tra...@googlegroups.com
Mohammad, seems like you must accept the Google API Terms of Service on the project 931456084485 before being able to use.
Go to your Google API Console, accept the ToS and let me know if you still have this problem.

Mohammad Kandil

unread,
May 22, 2012, 5:34:16 PM5/22/12
to google-tra...@googlegroups.com
Hello Joao,

Where is this Terms of Service link, I went back to my project and checked all the tabs at https://code.google.com/apis/console/?pli=1#project:931456084485:overview

I couldn't find anything mentioning any agreement,


João André Martins

unread,
May 23, 2012, 10:11:04 AM5/23/12
to google-tra...@googlegroups.com
Hey Mohammad, many apologies, as I was prompted for ToS acceptance when I opened your API console, so I assumed that you still had not activated the project.
I see your Translate API quotas have always been at 0%, have you ever been able to use the Translate API with the API key?

João André Martins

unread,
May 23, 2012, 11:10:30 AM5/23/12
to google-tra...@googlegroups.com
Mohammad, would you please launch a request to https://www-googleapis-test.sandbox.google.com/zoo/v2/animals?trace=token:ACwti_eoTk8Ufv0h7tGgOeQAb3nvvPGgtxz441JtiucfHYjodPMV2rSPhwMtDO87sWVW5iTV_8MbuYkflmkFLw7rmLPGYPmynw ?

If this works for you, I would also like you to add the trace=token:ACwti_eoTk8Ufv0h7tGgOeQAb3nvvPGgtxz441JtiucfHYjodPMV2rSPhwMtDO87sWVW5iTV_8MbuYkflmkFLw7rmLPGYPmynw parameter to the request you're making to Translate API and re-try making a call to Translate API.

João André Martins

unread,
May 24, 2012, 4:54:59 AM5/24/12
to google-tra...@googlegroups.com
Mohammad, I have gotten the traces for the first request, but not the second. Did you try it? Can you post the URL here (w/o the API key)?
Thanks

João André Martins

unread,
May 24, 2012, 1:38:52 PM5/24/12
to google-tra...@googlegroups.com
If you try to add the trace parameter to the Translate API request, use this trace key instead: ACwti_dq9iUI9q1CIbTROIN4OK1nC0yeVLGDqfIWvdRrEFpxKzerdI5KkhXn0jBMRIvrbm8_HrZasnNwEMaWqxr2nPZl7IyUHQ

Mohammad Kandil

unread,
May 25, 2012, 12:53:55 AM5/25/12
to Google Translate API Developer Forum
I'm not sure how to add the trace, I am using a gtranslate.net plugin
and it's not open source so I'm not able to edit the request it's
currently making,

I've contacted their developers. Is there another way, can I simply
make another account and enable billing on it?

João André Martins

unread,
May 25, 2012, 6:26:05 AM5/25/12
to google-tra...@googlegroups.com
Your project has billing enabled, so you should be able to generate requests to Translate API from the same project.

Mohammad Kandil

unread,
May 27, 2012, 9:45:16 PM5/27/12
to Google Translate API Developer Forum
It's still not working,

are you able to look at the rest of the options to make sure i've set
them up correctly, referral... etc

this is really frustrating...

João André Martins

unread,
May 28, 2012, 11:14:34 AM5/28/12
to google-tra...@googlegroups.com
If you are not making the request yourself, but using a plugin instead, then chances are that the plugin is not even using the API key for your project.
I encourage you to make a request as explained here. If you try but are still unable, try adding trace with the 'ACwti_dl12H_m6EFNtwmLe5dM7EMI1FaE9L_6948aV4BE5QIdsDTVtNFs9v2hdS2lWXrX5go5nA2hLeXmaesZRsJUeQoGnrdeA' tracing token, as explained before.

Marko Blažeković

unread,
Jun 27, 2012, 12:41:30 PM6/27/12
to google-tra...@googlegroups.com
I am having the SAME exact problem.
Maybe you should try your coders and make them fix a bug, not alyways finding problems at customers. I dont use any plugins, I wrote my PHP by hand and I still get 403 errors all the time. Billing is good, everything is good, your code is probably bad, please don't ignore this posts

my code
...
            if ($translate['en']){
                $json_object = json_decode(file_get_contents('https://www.googleapis.com/language/translate/v2?key='.$translate['key'].'&q='.urlencode($status_text).'&source=en&target=hr'));
                if (!empty($json_object->data->translations[0]->translatedText) && isset($json_object->data->translations[0]->translatedText)){
                    $status_text = $json_object->data->translations[0]->translatedText;
                }
            }

Marko

unread,
Jun 27, 2012, 1:38:49 PM6/27/12
to google-tra...@googlegroups.com
I checked everything 10 times.

Billing is enabled, project ID added, quotas rasied to max. Referees set, all kinds of, but I still get 403

warning: file_get_contents(https://www.googleapis.com/language/translate/v2?key=AIzaSyBfcDFNC5L5-1vGq5mNB4NckRgL1G5-Mds&q=pandora&source=en&target=hr): failed to open stream: HTTP request failed! HTTP/1.0 403 Forbidden in /srv/www/test/public_html/sites/all/modules/crawl/crawl.module on line 6 

all the time when I Run my script.

At least you have accessability problem with this API, if not more. I dont know what else to do.

João André Martins

unread,
Jun 29, 2012, 12:02:04 PM6/29/12
to google-tra...@googlegroups.com
Marko, please add the trace parameter to your request.
i.e., '&trace=token:ACwti_eFGF6Q77ChPGjfnU7yicCsILIXjZ_pt7TgNYv80_5l5uxSGho1g4jinIOf2qBerAkf_WICYKXcxPlxhcuPk_0drKukoA'

This token is available for one day only, so you should do the request until tomorrow at this time.
Reply all
Reply to author
Forward
0 new messages