Google Maps API Request Denied

This topic contains 5 replies, has 3 voices, and was last updated by  tmfsupport 8 years, 3 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #331377

    tmfsupport
    Expired Member
    Post count: 13

    When adding a listing and setting the address my browser console reports:
    This API project is not authorized to use this API. Please ensure this API is activated in the Google Developers Console.

    If I set the address, the console message repeats, plus I get a popup:
    Geocode was not successful for the following reason: REQUEST_DENIED

    I used to get both of these just by loading the GD general settings screen. But that has cleared up since I changed (and reverted) some of the GD/maps settings that chose to filter types and the default type.

    I have GD installed as tests on two other sites and they get the first console message when loading the add-listing screen. However when setting an address, the console reports [object]s with addresses and the map works, unlike on the production site which gets [] then REQUEST DENIED.

    All sites are SSL everywhere and have been for a while.

    Google Maps Javascript API enabled and configured according to this document:
    https://wpgeodirectory.com/docs/add-google-api-key/

    I have already gone through these tests:
    Disabled all plugins except GD.
    Generated a new key in the console.
    Deleted the key and created a new one.
    Unrestricted the key.
    Deleted the project and created a new one with a new key.

    Immediately after creating a new key, the browser console on PA reported that the key was expired. But after a few minutes it changed and has remained with the above message.

    Currently the new API key is unrestricted and installed on all three sites mentioned.

    Thanks for your help.
    Cory

    #331380

    Guust
    Moderator
    Post count: 29970
    #331385

    tmfsupport
    Expired Member
    Post count: 13
    This reply has been marked as private.
    #331388

    tmfsupport
    Expired Member
    Post count: 13

    I had edited my post perhaps after you replied. All our production and test sites are SSL everywhere.
    Thanks.

    #331892

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    The error shown is “This API project is not authorized to use this API. Please ensure this API is activated in the Google Developers Console” You must not have activated a certian part of the google maps api needed, you can create a new one by clicking the generate api key button under GD>Design>Maps

    Thanks,

    Stiofan

    #332239

    tmfsupport
    Expired Member
    Post count: 13

    I wrote above that I used the same API key on two test sites and although it does report an API error, it does allow the map to function and report a location without a popup error, so clearly something is different on the main site, and the key is enabled and working.

    Nevertheless, I erased the API key from the settings, saved, then I clicked Generated A Key to allow it to create a brand new project. I then saved and applied the new key.

    Now it is working. I’ll let you know if that changes (sometimes I noticed Google changing behavior after a day). Thank you very much for your help.

Viewing 6 posts - 1 through 6 (of 6 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount