JS: project Wanderlust: step 13: error message on console

Please can somebody assist with the following error message on the JS console when executing step 13:
//
b304e258aecb4321af9e8e7d21d42d64.cc-propeller.cloud/:1
Access to fetch at
https://developer.foursquare.com/docs/api-reference/venues/explore/?near=London&limit=10&client_id=MMO5PQICDTP5Z0DURENXASYX5NRXNA3LUKTZQHBVZL4ZEH2C&client_secret=VJE2VNB1LJ5D0XNMF15QTK5H3P4LFDJZXOFNTL0KY503VLO4&v=20200917

from origin
https://b304e258aecb4321af9e8e7d21d42d64.cc-propeller.cloud
has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource. If an opaque response serves your needs, set the request’s mode to ‘no-cors’ to fetch the resource with CORS disabled.

main.js:24 GET https://developer.foursquare.com/docs/api-reference/venues/explore/?near=London&limit=10&client_id=MMO5PQICDTP5Z0DURENXASYX5NRXNA3LUKTZQHBVZL4ZEH2C&client_secret=VJE2VNB1LJ5D0XNMF15QTK5H3P4LFDJZXOFNTL0KY503VLO4&v=20200917 net::ERR_FAILED
getVenues @ VM7 main.js:24
executeSearch @ VM7 main.js:62
dispatch @ VM5 jquery-3.2.1.min.js:3
q.handle @ VM5 jquery-3.2.1.min.js:3
main.js:30 TypeError: Failed to fetch

I checked online what CORS means, but haven’t got a clue where this should be rectified, :blush: thank you.

Hello,

You’ll learn about CORS later on, so I won’t go into detail here, but it doesn’t look like your issue is actually related to it.

It looks like you’re using the wrong URL for the Foursquare APIs. You appear to be using https://developer.foursquare.com/docs/api-reference/venues/explore/?near= while you should be using:
https://api.foursquare.com/v2/venues/explore?near=

I went back into my completed project and used the incorrect URL in your code and was able to get the same type of error.

1 Like

hello,

thank you very much for your help and next time I’ll read the displayed page properly.
Everything’s sorted …for now :grinning:.

1 Like