title: Google Maps API error: RefererNotAllowedMapError on play store
body: <p>It has many answers online but still I am dumb enough to crack it myself :(.</p>
  
  <p>I have an Ionic hybrid app (Ionic, angular and Visual Studio). Development is almost done and working fine. I have signed my app using .keystore certificate. I have also generated an API key in Google Console and gave it restriction on <code>HTTP Referrers (Web Site)</code>.</p>
  
  <p>On my local (dev environment), it stopped working. So I added <code>http://localhost:4000/index.html#find</code> (or even <code>localhost</code>) as referrer to API key. This fixed the problem and now it is working fine.</p>
  
  <p>However my app is not working in android device. I am not sure what should be the referrer URL there. As a trial, I debugged my device using visual studio. Following is the error that I tracked.</p>
  
  <pre><code>Google Maps API error: RefererNotAllowedMapError https://developers.google.com/maps/documentation/javascript/error-messages#referer-not-allowed-map-error
  Your site URL to be authorized: file:///android_asset/www/index.html#find
  </code></pre>
  
  <p>However adding <code>file:///android_asset/www/index.html#find</code> as referrer is not solving the problem. To me it looks expected as they are pointing to raw file to my system (as I am debugging). So, what should be the value of this to make all devices work after I add my app to play store?</p>
  
  <p>Do it has to come from <code>manifest.xml</code> or my app project? Or do I need to mention this somewhere in <code>Google Play Console</code>? Could anyone please guide me?</p>