Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

JIRA server returns 401 error response

Nisha_PugalPetra_Perumal June 19, 2019

I have been using JIRA API to get Data.These much days ,I was able to access API using  email as username and password .Now when I try to call API, it returns 401 unauthorized error. As per

https://id.atlassian.com/manage/api-tokens 

I tried to create API token but https://{domian}.atlassian.net/mange/api-tokens return Dead link. Could you please let me know how to create token or is there any other way to login via API.

1 answer

0 votes
Dario B
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 20, 2019

 

Hi @Nisha_PugalPetra_Perumal ,

I am not sure I understand correctly the issue in here. However, in order to create an API Token that then you will use to authenticate REST API calls against your instance you have to go to https://id.atlassian.com/manage/api-tokens and not  https://{domian}.atlassian.net/mange/api-tokens.

Also, in case you have already done this an it does not work, can you kindly try to authenticate a REST API call like the one provided in example and paste the output in here (please remember to hide the sensitive data like in below example):

curl -D- -u xxxxxxxx@atlassian.com:xxxxxxxxxxxx https://xxxxxxxx.atlassian.net/rest/api/latest/project

HTTP/2 200 
server: AtlassianProxy/1.15.8.1
vary: Accept-Encoding
cache-control: no-cache, no-store, no-transform
content-type: application/json;charset=UTF-8
strict-transport-security: max-age=315360000; includeSubDomains; preload
date: Thu, 20 Jun 2019 10:26:43 GMT
atl-traceid: af596f516b1ca785
x-aaccountid: 557057xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
x-arequestid: a431fbf3xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
x-xss-protection: 1; mode=block
timing-allow-origin: *
x-content-type-options: nosniff
set-cookie: atlassian.xsrf.token=BAL3-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx; Path=/; Secure

 
{
"expand": "description,lead,issueTypes,url,projectKeys,permissions",
"self": "https://xxxxxxx.atlassian.net/rest/api/2/project/10301",
"id": "10301",
....
[removed]
....

 

 

Cheers,
Dario

Suggest an answer

Log in or Sign up to answer