My account has just been upgrade to a cloud account and now I am unable to call the JIRA API using basic authentication, all calls appear to result in a 401 Unauthorized response. Has there been a change to how one should access the API or has something gone wrong with the upgrade?
I have tried curl and Postman and both have the same results, also here is the some sample code (C#), I have tried both the original username and my email:
Uri uri = new Uri("https://foo.atlassian.net/rest/api/2/myself");
string authenticationString = "myUserName" + ":" + "thisIsNotMyPassword,OrIsIt?";
string encodedAuthenticationString = Convert.ToBase64String(Encoding.Default.GetBytes(authenticationString));
var request = WebRequest.Create(uri);
request.Headers["Authorization"] = "Basic " + encodedAuthenticationString;
request.ContentType = "application/json";
request.Method = "GET";
var response = request.GetResponse();
We had a very simmilar issue. It appears that you cannot login using a username anymore. Atlassian reccomended we use an email address instead of a username.
They also encouraged us to use oauth instead of basic auth; however, we’ve been trying to use oauth for quite some time and cant get it to work. Atlassian support is refusing to help troubleshoot the issue.