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
Jared Rader
Courses Plus Student 4,445 Pointsadding static map 403 error
So I followed the video in adding a static map to the Smells Like Bakin' site, but I get this error:
Failed to load resource: the server responded with a status of 403 (Forbidden)
I put that into google and it seems that you get this error when you add the API key and that the API key is no longer needed for static maps. I removed the API key, and the map shows up fine.
The API key was added in the video, so I'm not sure if this is a recent change or what. Anyone have any insight on this?
7 Answers
Matt McClard
5,676 PointsOk, I was having the same problem here, but I think I was able to fix it and still use an API Key.
There is now an additional service to activate in the API Console > Services called "Static Maps API". Once I switched that to "ON" and generated a new API key everything worked correctly.
Jared Rader
Courses Plus Student 4,445 PointsAlso, I am practicing all of this stuff on a local web server set up through MAMP PRO, in case that might be influencing things...
Yu (Dilys) Sun
5,812 PointsThanks for the tip! I ran into the same 403 Forbidden error when developing my Ruby on Rails app. I also confirmed that without the key, which is no longer required, the error disappeared too.
Laurie Williams
10,174 PointsSo how did you resolves the issue on ROR? I still cannot find a solution.
Tavo Zambrano
5,240 PointsThanks for posting the solution. It is no longer needed the Key for Static Google Map -- > https://developers.google.com/maps/documentation/staticmaps/?hl=es-419&csw=1 "Google Key not required."
Joseph Twumasi
Front End Web Development Techdegree Student 652 PointsThanks for solutions mine works now when I turned on Static Google Map
Joseph Twumasi
Front End Web Development Techdegree Student 652 PointsThanks for solutions mine works now when I turned on Static Google Map
Jorge Guzman
Courses Plus Student 21,390 PointsThanks for the solutions guys, I tried both: deleting the key, and it worked. Then, also tried activating the Statics Map API using the key and it worked too.
Cheers.