I am making this simple get request using jquery ajax:
$.ajax({
url: "https://app.asana.com/-/api/0.1/workspaces/",
type: 'GET',
success: function(res) {
console.log(res);
alert(res);
}
});
It's returning an empty string as a result. If i go to this link in my browser, i get:
{"status":401,"error":"Not Authorized"}
which is the expected result. So why isn't it working using ajax? thanks!