28

What this is NOT

a) a "sensor=true_or_false" issue
b) a key is wrong issue (unless the key I got has limitations)
c) too many requests (since I only make one request)
d) cross domain (since I load the url from the browser location bar)

What I did

  1. Signed up http://code.google.com/apis/maps/signup.html

  2. Tried the example on that page in the location bar (I know about cross domain from script)

    works fine

  3. Read the documentation

  4. Pasted their example exchanging their key for mine

    returns

{
   "html_attributions" : [],
   "results" : [],
   "status" : "REQUEST_DENIED"
}

So far all entries failed due to wrong key or sensor=true_or_false

And for example the url in this one Google Places API jQuery.ajax() request fails with working URL

also gives me error when pasted into the browser.

What did I miss?


UPDATE

So I went to get some keys

Key for browser apps (with referers)
API key:    
AIzaSyCStj9m5LNTu9mCf6cQGDVAFKZC7Y?????
Referers:   
Any referer allowed
Activated on:   Jan 30, 2012 1:03 PM
Activated by:   me 

and tried again. Still does not work.

4
  • Do not put "solved" or anything similar in the question title or the question itself. If anything, post as a comment or as an answer.
    – casperOne
    Sep 6, 2012 at 12:56
  • Did you enable places API in services tab?
    – sites
    Apr 26, 2013 at 16:18
  • This is more than a year ago. I have not looked since
    – mplungjan
    Apr 26, 2013 at 17:30
  • Here is another worth looking at stackoverflow.com/questions/8427980/…
    – mplungjan
    Aug 5, 2016 at 17:11

5 Answers 5

24

This is actually (b): wrong key. Actually, you're using the wrong kind of key (from Sign Up for the Google Maps API which is only good for the JavaScript V2 API).

Please see Obtaining an API Key for how to get a new API key, of the new kind.

Edit: At the time this question arose, valid API keys that worked on Geocoding API did not work on Places API, but now seem to work fine. Looks like some issue on Google side.

7
  • Thanks That sounded like an excellent idea. However that did not solve the issue at all. I asked for a new key and STILL got the error
    – mplungjan
    Jan 30, 2012 at 21:04
  • Would you mind posting here the whole URL you're using to load the API? Feel free to omit the last, say, 5 characters in the key.
    – miguev
    Jan 31, 2012 at 18:17
  • Erm, I forgot to save it. I went to your site and clicked request new key and that is what I used.
    – mplungjan
    Jan 31, 2012 at 18:56
  • Sorry, maybe I should have mentioned this before: there actually two kinds of keys you can create in the API console (Server vs Browser). Did you hit "Create new Server key..." or "Create new Browser key..."? For the JavaScript APIs, you need a Browser key. If that still doesn't work, please let us see the whole URL minus the last few characters of your key.
    – miguev
    Jan 31, 2012 at 21:34
  • 5
    My apologies, I hadn't realized (until now) you were trying to use the Places API. I actually have the same problem, I can use API keys in all Maps API (JavaScript, Geocoding, Directions, etc.) but not on the Places API. Still haven't figure out why, will let you know when I do.
    – miguev
    Feb 1, 2012 at 15:31
6

I just got a REQUEST_DENIED response when making an autocomplete request in a Ruby app. It turned out that I had not specifically switched on the Places API in my google api console.

Go to: https://console.developers.google.com and login. In the left menu go to "APIs & auth" -> "APIs" Then find the "Places API" option and click on the status to the right to toggle it to "on"

This fixed the problem immediately for me.

1
  • Thanks for the comment. My 2 year old issue is no longer relevant
    – mplungjan
    Mar 6, 2014 at 10:13
6

Ohkay this worked for me and i know it will work as we are making the same mistake.

First go to API's and enable the google places api for web. After that, go to credentials and in the credentials where your key is showing, click on it. After clicking, in the restrictions tab, choose what will be the API will be doing.

Set that up, restart your script and voila... it will be done.

1
  • @mplungjan i am developing one right now, that is why i thought to answer it... haha. Apr 3, 2018 at 17:44
2

I faced the same issue. But was able to resolve it after enabling the Places API from Google console. I used the 'server' key to make a call from application. Hope this helps for others looking for solution.

0
-2

This issue has been discussed on many threads here... but the bottom line is you should check your code to see if u are sending out too many requests at a time to the google API. You are only allowed to send 1 request per 1 minute.

MKErrorDomain error 4 iPhone

1
  • 2
    I know and none of the threads match my issue. I am not sending too many requests, I am loading 1 URL into the browser's location bar once
    – mplungjan
    Jan 30, 2012 at 9:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.