Hi
I have a problem with basic auth too. Got 401. I tried culr wget http python-request. Samples from https://developer.atlassian.com/jiradev/api-reference/jira-rest-apis/jira-rest-api-tutorials/jira-rest-api-example-basic-authentication don't work. Please help.
Are you querying jira.atlassian.com, a local dev instance of JIRA or another instance?
You have to use Atlassian ID when you are logging in to jira.atlassian.com.
I have tested these commands and they work for me.
curl \
-i -X POST \
-H
"Content-Type: application/json"
\
https:
//<a href="http://id.atlassian.com/id/rest/login" rel="nofollow noopener noreferrer">id.atlassian.com/id/rest/login</a> \
--data
'{"username": "foobar@<a href="http://example.com/" rel="nofollow noopener noreferrer">example.com</a>", "password": "foobar"}'
Response:
TTP/
1.1
200
OK
Server: nginx
Date: Mon,
03
Feb
2014
05
:
57
27
GMT
Content-Type: application/json
Transfer-Encoding: chunked
Connection: keep-alive
X-Frame-Options: DENY
P3P: CP=
"This is not a P3P policy! See <a href="http://www.atlassian.com/company/privacy" rel="nofollow noopener noreferrer">http://www.atlassian.com/company/privacy</a> for more info."
Set-Cookie: __ATL_TOKEN=L33TT0KEN; Version=
1
; Domain=.<a href="http://atlassian.com/" rel="noopener noreferrer">atlassian.com</a>; Path=/; HttpOnly
{
"username"
"foobar@<a href="http://example.com/" rel="nofollow noopener noreferrer">example.com</a>"
,
"xsrfToken"
"firstName"
"Foo"
"lastName"
"Bar"
}
Use the given cookie __ATL_TOKEN for subsequent requests
-D- -X GET \
"Cookie:__ATL_TOKEN=L33TT0KEN; Version=1; Domain=.<a href="http://atlassian.com/" rel="noopener noreferrer">atlassian.com</a>; Path=/; HttpOnly"
//<a>jira.atlassian.com/rest/api/2/search\?jql\=project+%3D+CQ</a>
<br>
My question is about jira.atlassian.com. As I said I was using my Atlassian ID for HTTP Basic authentication and jira.atlassian.com REST API was working with it until end of January. But something has changed in February and now just for jira.atlassian.com site REST API with HTTP Basic authentication is returning 403 Forbidden response.
mirantis.jira.com and https://vetakoko.atlassian.net
The server at extranet.atlassian.com can't be found, because the DNS lookup failed. Can you provide another url?
I found solution. I use email as login instead of username in jira. Please write this to doc file.
I will copy content from that page and paste it in a new answer.
It looks like you're new here. Sign in or register to get started.