Invalid auth error


#1

https://www.codecademy.com/courses/intermediate-javascript-requests/projects/wanderlust?course_redirect=introduction-to-javascript

I am using fetch to send a GET request (to urlToFetch). The url() to fetch works fine, but the url in response shows an invalid auth error.

This is the url used to fetch : https://api.foursquare.com/v2/venues/explore?near=dubai&limit=10&client_id=DOV52BER1BR1VCRU5CPGK3UUNH544PJUYCFMPT540C3BXF01&client_secret=RAUBXSKD141LNPPFCEYDJSQOSK5HCHXR1G02MBLGKCOK3MA5&v=20181001

This is the response generated:
Response {type: “cors”, url: “https://api.foursquare.com/v2/venues/explore?near=…1LNPPFCEYDJSQOSK5HCHXR1G02MBLGKCOK3MA5&v=20181001”, redirected: false, status: 200, ok: true, …}


#2

Clicking on that URL fetches the data just fine, and the response code is correct.

HTTP code 200 refers to “OK”:

Not sure why you’d get an invalid auth error? Can we see the error?