I can successfully connect to Jira using the Chrome Rest Console and get an issue in JSON. I used basic authentication. However, I cannot seem to do this from my local development PC using a .net web application. I've tried connecting using System.Net.WebRequest, System.Net.Http.HttpClient, jQuery.getJSON and even tried the Atlassian.Net SDK from NuGet.
All of these are giving me a 401 Unauthorized message. I'm confident my username and password are correct and base64ed fine since it works in the Rest Console.
I've tried code similar to this "answer" but am still 401 errors: https://answers.atlassian.com/questions/79902/using-httpclient-c-to-create-a-jira-issue-via-rest-generates-bad-request-response
Does anyone have suggestions on what I can do to determine the issue? Is it related to running locally? Is there a specific part of the header that would cause this particular error message (althougth I've tried mirroring what the Chrome Console is sending)?
I was logged into Jira in a browser, then running the Chrome Rest Console. The session was alive from the Jira login so it was burrying the fact that the Rest Console was not actually logging in.
I finallly found that the problem was using my email address and not my user login. I used my email becase that is what Jira was showing me in the browser. I didn't figure this out faster because of the console issue. So, make sure that you are using your Jira login and password (and not your email or any OAuth info.)
UPDATE: I just realized that it was working in the Chrome Rest Console only when I had another tab logged into Jira. When I logged out of Jira in the separate tab, the console gave me the 401 Unauthorized message. So, apparently the Console was not working afterall and instead using my browser session?
I've also tried using https://myDomain.atlassian.net/rest/api/2/issue/DEMO-2?os_username=myLogin&os_password=myPassword. This did not work either.
I still cannot figure out how to authenticate. I'm wondering if it has something to do with the Google integration, although I'm using my Jira login and password (not my Google one.)
Badges are a great way to show off community activity, whether you’re a newbie or a Champion.Learn more
...+ reading Fantasy). The same is true for him at the bank he works for: Efficiency is key when time literally equals money. Read on to learn how Sergey makes most of the time he has by...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs