# Google Maps Reverse Geocoding API problem

**URL:** https://forum.kirupa.com/t/google-maps-reverse-geocoding-api-problem/302525
**Category:** flash
**Created:** [January 2, 2010, 1:52pm UTC](https://forum.kirupa.com/t/google-maps-reverse-geocoding-api-problem/302525 "2010-01-02T13:52:51Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![jadezoole](https://avatars.discourse-cdn.com/v4/letter/j/85e7bf/32.png) [@jadezoole](https://forum.kirupa.com/u/jadezoole)
#### Post date: [January 2, 2010, 1:52pm UTC](https://forum.kirupa.com/t/google-maps-reverse-geocoding-api-problem/302525/1 "2010-01-02T13:52:51Z")

</div>

I just stucked with Google Maps Reverse Geocoding API ([http://code.google.com/intl/hu-HU/apis/maps/documentation/geocoding/#ReverseGeocoding](http://code.google.com/intl/hu-HU/apis/maps/documentation/geocoding/#ReverseGeocoding))  
I have geolocation in lat and lon coordinates, and want to request some address detail to the location, thats why I want to use Google Maps API.

My code is the following:

```auto

public function getaddress(lat:Number,lon:Number):void{
		//Google Maps reverse geocode			
		var getVars:URLVariables = new URLVariables();
		getVars.q = lat+","+lon;
		getVars.output = "xml";
		getVars.sensor = "false"
		getVars.key=googleMapsAPIKey
			
		var uloader:URLLoader=new URLLoader()
		uloader.addEventListener(Event.COMPLETE,gapicomplete)
		uloader.addEventListener(HTTPStatusEvent.HTTP_RESPONSE_STATUS,statushandler)
		var apireq:URLRequest=new URLRequest("http://maps.google.com/maps/geo")
		apireq.data = getVars;
		uloader.load(apireq)
}

```

In the response I get the following XML:

```auto
<kml xmlns="http://earth.google.com/kml/2.0"><Response>
  <name></name>
  <Status>
    <code>610</code>
    <request>geocode</request>
  </Status>
</Response></kml>

```

The 610 error means bad API key.

The strange thing that, if I write the request simply in a browser (using the same API key) I get normal response with data.

I use Flash CS4 and AIR. Any advice? Thanks in advance!
