Im a total noob and I'm just beginning to learn about APIs. I'm trying to use the Yelp API and I cant seem to access it.
According to the documentation, I'm supposed to: Put the API Key in the request header as Authorization: Bearer
I'm not familiar with Authorizations and Not sure if I'm doing it correctly. Here's what I have
function displayYelp() {
var URL =
https://api.yelp.com/v3/businesses/search?term=restaurant&latitude=40.82783908257346&longitude=-74.10162448883057;
$.ajax({
url: URL,
method: GET,
headers: {
authorization:
bearer //My Key Goes Here,
},
}).then(function(response) {
console.log(response);
});
}
Even if you can't answer my specific question, Any help on what Authorization means would be greatly appreciated!