Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Daniel Lee
6,576 PointsGoogle Maps API Key not working
I added the img with the source to the google maps api and put my key in, but it comes up with an error saying:
The Google Maps API server rejected your request. This site or IP is not authorized to use this API key.
Src Code:
<img src="http://maps.googleapis.com/maps/api/staticmap?key=XXXXXXXXXXXXXXXXXXXXXXXXXXXXX&size=400x300&sensor=false&markers=622+E+Washington+Street,+Suite+240+Orlando,+FL+32801" alt="622 E Washington Street, Suite 240, Orlando, FL 32801">
2 Answers
Daniel Lee
6,576 PointsI think I figured it out. I hadn't enabled Static Maps API. After enabling it, the image loaded.
Andrew Showalter
14,028 PointsI have had this happen to me in the past also. It *may have something to do with your api key control and which referrers you allow to use your key. Not 100%, but that may be a possibility.