ruby on rails - Google Geocoding API request_denied -


I am trying to geocode a batch of around 400 addresses using the Google Geocoding API through my Rail App I am

I have these lines in one of my controllers

  is required "pure / http" required "uri" uri = URI.parse ("http: / /maps.googleapis com / maps / api / geocode / json? ") Response = Net :: HTTP.post_form (Yuri, {" address "=> '5032-forbes-ave', 'sensor' = & gt; ; 'Wrong'})  

But always get "status" back from: "REQUEST_DENIED" from that

Does someone know why I am receiving this, or if there is any way I am actually seeing the HTTP request which is being sent, so can I try to debug it?

Update: This is the request that I am trying to do, if I do this from my browser, I get general feedback from the API:

You are posting a request but in your browser you are using GET.

So this work is completely done:

  Yuri = URI. ("Http://maps.googleapis.com/maps/api/geocode/json?address Reactions = Net :: HTTP.get (uri)  

The response is the string and it contains some JSON (I'm a Google API expert I'm not)


Comments