• Resolved hebhansen

    (@hebhansen)


    Hey Geo

    I just went over my API Client and API Server. I have copied keys and they should be exact. I am getting an error on server api test:

    						Array
    (
        [error] => REQUEST_DENIED - This IP, site or mobile application is not authorized to use this API key. Request received from IP address 2a01:4f8:271:2a11::2, with empty referer
        [data] => stdClass Object
            (
                [error_message] => This IP, site or mobile application is not authorized to use this API key. Request received from IP address 2a01:4f8:271:2a11::2, with empty referer
                [results] => Array
                    (
                    )
    
                [status] => REQUEST_DENIED
            )
    
    )
    					

    Any ideas how to attack this? I am not sure if I have static IP with my host. Is that an issue?

    Also, is there a way to test the client side? Not sure what one does, and what the other does.

    Thx

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter hebhansen

    (@hebhansen)

    Array
    (
        [error] => REQUEST_DENIED - This IP, site or mobile application is not authorized to use this API key. Request received from IP address 2a01:4f8:271:2a11::2, with empty referer
        [data] => stdClass Object
            (
                [error_message] => This IP, site or mobile application is not authorized to use this API key. Request received from IP address 2a01:4f8:271:2a11::2, with empty referer
                [results] => Array
                    (
                    )
    
                [status] => REQUEST_DENIED
            )
    
    )
    					

    Any ideas why this is happening?

    Plugin Author Eyal Fitoussi

    (@ninjew)

    Hello @hebhansen,

    1. In your Google Maps server API setting ( in your Google console page ) you need to restrict the IP address mentioned n the error message ( 2a01:4f8:271:2a11::2 ). See step 12 of this tutorial to learn how to do so.

    2. There isn’t a direct way to test your browser ( client side ) API key. However, this key is responsible for displaying the maps and address autocomplete feature on your site. So if the maps are working in the Location form in the back-end and in the search form of the front end then the key is working.

    let me know if this helps or if you have additional questions.

    Thread Starter hebhansen

    (@hebhansen)

    Alright Eyal

    1. Server Key is restricted like so. I have double checked server IP and it’s correct. IP points to host. Domain is registered with Cloudflare. Is that an issue? I have generated a new key, to see if that was an issue. Problem is the same….
    2. Client side: Geotag works for fx post. Also auto address works correct, so I am guessing only server is the problem. Thx
    Plugin Author Eyal Fitoussi

    (@ninjew)

    Hi @hebhansen,

    The screenshot you provided shows the API Restrictions which is different. I was referring to the Application restriction which should be above the API restriction.

    You need to set the Application restriction to IP Addresses and then enter the IP address from the error message above.

    • This reply was modified 9 months, 4 weeks ago by Eyal Fitoussi.
    Thread Starter hebhansen

    (@hebhansen)

    This does not look like an IP to me – 2a01:4f8:271:2a11::2 but I threw it in anyways and it works. Is that IP6?

    Thx so much. Great I will mark as solved. Great plugin So cool really

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘API server test – Request denied’ is closed to new replies.