Forums

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

Recently i am getting Authentication error in Jira rest API. Is there any change?

Mumtaz Ahmad June 24, 2019

Recently i am getting Authentication error in Jira rest API. Is there any change?

1 answer

0 votes
Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 25, 2019

Hi Mumtaz,

Yes, Atlassian Cloud recently deprecated the use of clear text passwords and cookie based authentication in the Basic auth methods.  There is a notice about this in Deprecation notice - Basic authentication with passwords and cookie-based authentication.

It is still possible to use Basic Authentication with Atlassian Cloud, but in order to do so now, you would need to create an API Token.  There are also examples of using this API token in Basic auth for REST APIs.  The use of this token require you to first base64 encode your account's emailaddress:API_Token_string and then supply that encoded string in an auth header:

Supplying basic auth headers

If you need to, you may construct and send basic auth headers yourself. To do this you need to perform the following steps:

  1. Generate an API token for Jira using your Atlassian Account: https://id.atlassian.com/manage/api-tokens.
  2. Build a string of the form useremail:api_token.
  3. BASE64 encode the string.
  4. Supply an Authorization header with content Basic followed by the encoded string. For example, the string fred:fred encodes to ZnJlZDpmcmVk in base64, so you would make the request as follows:
curl -D- \
-X GET \
-H "Authorization: Basic ZnJlZDpmcmVk" \
-H "Content-Type: application/json" \

I hope this helps,

Andy

Suggest an answer

Log in or Sign up to answer