title: Google Maps JavaScript API v3 for Work UnauthorizedURLforClientIdMapError
body: <p>I'm using Google Maps Web Services API for work, and they've given me a client ID. When I load up the main page, I don't get an error. However, when I click a sub-page, eg localhost:8080/pages/page.xhtml, I get an error called UnauthorizedURLforClientIdMapError, with the message that this URL is not authorized to use the provided Google Maps client ID.</p>
  
  <p>For reference, Google discusses it in its documentation here: <a href="https://developers.google.com/maps/documentation/business/clientside/auth#registering_authorized_urls" rel="nofollow">https://developers.google.com/maps/documentation/business/clientside/auth#registering_authorized_urls</a></p>
  
  <p>With all that being said, I'm currently testing my server with TomCat using the URL <a href="http://localhost:8080" rel="nofollow">http://localhost:8080</a>. This domain has been authorized, as has my individual IP. In my view files, I'm adding this: </p>
  
  <pre><code>&lt;script src="https://maps.googleapis.com/maps/api/js?    &amp;amp;client=MY_CLIENT_ID
          &amp;amp;v=3.19
          &amp;amp;channel=MY_CHANNEL" type="text/javascript"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>where 'MY_CLIENT_ID' and 'MY_CHANNEL' are obviously changed to suit my needs (my client id and channel are correct). I've searched through stack overflow and also read all of the relevant Google Documentation but I feel like I'm missing something very small (or large, I'd hope not though).</p>
  
  <p>What's going on?</p>