API key or map does not work right

Homepage Forums Pro Support Forum Wortex Pro Wortex Pro Support API key or map does not work right

API key or map does not work right

This topic contains 13 replies, has 2 voices, and was last updated by  iceable 4 months, 2 weeks ago.

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #20624
    API key or map does not work right

    Koen
    Participant

    Dear Mathieu,

    I am having trouble getting the Map shown like it should. I have activated a new API key. It worked at first, now it’s gone. It shows the space needed, but that’s all. No matter what browser, it does not show. The text editor does show the code:
    [maps title=”” col=”full-width” height=”200″ type=”ROADMAP” zoom=”15″ address=”Laurierstraat 20, Amsterdam” lat=”” lng=”” controls=”off” api=”REDACTED”]

    Any clue?

    best regards, Koen

    • This topic was modified 4 months, 2 weeks ago by  iceable. Reason: Removed personal API key
    #20626
    Reply to: API key or map does not work right

    iceable
    Keymaster
    Support
    Happy with my help?
    Buy me a beer!

    Hi Koen,

    Google Map returns the following error on your page (one can see it in the inspector’s console):

    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.

    To prevent API key theft and abuse, your maps API keys only works on websites that you have authorized.

    You need to go to your Google developer console and add your site to the list of authorized domains:

    – Go to https://console.developers.google.com
    – If you have several projects, make sure to select the right one on the top left next to the “Google APIs” logo
    – From the menu on the left, click “Credentials”
    – Click on your API key
    – Under “Key restriction”, select “HTTP referrers” and enter your site’s domain name. (you could also chose IP addresses and enter the API of your server; I would not advise setting restrictions to “none” though)

    #20627
    Reply to: API key or map does not work right

    Koen
    Participant

    Sorry I can’t get it right. I don’t see the “credentials” menu. Maybe it gets lost in translation? You do mean the drop down menu that appears after clicking the hamburger (see attach). I thought I did enter the site’s name before, selected HTTP Referrers etc., but apparently I have done something wrong. Guess I’ll have to delete this one and do it again…
    The thing is that I get lost with all the info Google asks. Should I choose one of the API libraries? I don’t recall having done this previously.
    Will try again tomorrow…
    Thanks for your patience.

    Attachments:
    You must be logged in to view attached files.
    #20630
    Reply to: API key or map does not work right

    Koen
    Participant
    This reply has been marked as private.
    #20634
    Reply to: API key or map does not work right

    iceable
    Keymaster
    Support
    Happy with my help?
    Buy me a beer!

    Still no luck? I remember having a hard time once when I was trying to add a new authorized site to an existing API key, I tried to add the URL with several formats and the server IP address and it would never work.
    Turned out that creating a fresh new key and immediately adding the site worked right away. Maybe this is worth a try?

    #20638
    Reply to: API key or map does not work right

    Koen
    Participant

    Goodmorning Luxemburg. Thanks for the suggestion. The current API key is still not working.
    So I’ll go for your idea and start all over.
    One question: this site is still being developed in a subdomain. So I’ll have to switch this in the WP administrator part later. Does this effect the API key?

    #20639
    Reply to: API key or map does not work right

    iceable
    Keymaster
    Support
    Happy with my help?
    Buy me a beer!

    If the domain changes then you will need to authorize the new domain (or even create a new key, as I mentioned in the previous reply).
    But if the site stays on the same domain and you only move the directory (i.e. move the site from domain.com/wordpress to domain.com) then this should not require any change.

    #20641
    Reply to: API key or map does not work right

    Koen
    Participant
    This reply has been marked as private.
    #20644
    Reply to: API key or map does not work right

    iceable
    Keymaster
    Support
    Happy with my help?
    Buy me a beer!
    This reply has been marked as private.
    #20645
    Reply to: API key or map does not work right

    Koen
    Participant
    This reply has been marked as private.
    #20646
    Reply to: API key or map does not work right

    iceable
    Keymaster
    Support
    Happy with my help?
    Buy me a beer!
    This reply has been marked as private.
    #20647
    Reply to: API key or map does not work right

    Koen
    Participant

    Well, at least it’s a solace that I’m not the only one struggling with this API keys.
    I have tried all your suggestions, but with no succes.
    So I guess I’ll ask Google what’s going on, but I’m afraid the answer will give even more frustration.
    Anyway, thanks a lot for your support again!

    #20648
    Reply to: API key or map does not work right

    Koen
    Participant
    This reply has been marked as private.
    #20649
    Reply to: API key or map does not work right

    iceable
    Keymaster
    Support
    Happy with my help?
    Buy me a beer!
    This reply has been marked as private.
Viewing 14 posts - 1 through 14 (of 14 total)

You must be logged in to reply to this topic.


PayPal Verified
Secured by PayPal
Secure Credit Card payments powered by Stripe
SiteLock