Following code in app giving exception "Access denied. You do not have permission to perform this action or access this resource". Even I have allowed permission "APP > MANAGE PERMISSION > TRUST IT".
$.ajax({
method: "GET",
url: hostweburl+"/_api/web/lists/getByTitle('Waqarreading')/items",
headers:{
"accept":"application/json;odata=verbose"
}
}).done(function(data) {
console.log("list-data ==== ", data);
}).fail(function() {
console.log("list-data Fail ");
}).always(function() {
console.log( "list-data Completed!" );
});
Request sent at: https://waqarmuneer.sharepoint.com/_api/web/lists/getByTitle('Waqarreading')/items