// localStorage.setItem("token", "Ваш токен");
let token = localStorage.getItem("token");
$.ajax
({
type: "GET",
url: "localhost/api/23/",
headers: {
"Authorization": "Basic " + token
},
success: function (){
alert('Success');
}
});