i am using this code but its giving me error message. can anyone help me to find the solution for it?


#1

$.get({
url: “https://api.envato.com/v1/market/total-items.json”,
headers: {“Authorization” : “Bearer token_name”}
}).done(function (data) {
console.log(data);
}).fail(function (jqXHR, textStatus) {
alert("error: " + textStatus);
});