when i requested this url - [GET] https://examplesite.atlassian/rest/api/1/session. i got this
response {
baseurl:"....",
name:"admin"
}
so, that i written code this way
const request = require("request");
var args = `Basic admin:password`;
function login() {
request.post( { url: "https://learnsite.atlassian.net/rest/auth/1/session", headers: { Authorization: args, "Content-Type": "application/json" } },
function(err, httpResponse, body) {
if (err) { return console.error("upload failed:", err); }
return console.log(JSON.stringify(httpResponse, undefined, 3)); } );
}
login();
but it is giving this error "Basic auth with password is not allowed on this instance".
i am completely confused now. please help me. thanks in advance