The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
  • Community
  • Q&A
  • Jira
  • Questions
  • Using email/API key, but still receiving "Basic authentication with passwords is deprecated" error

Using email/API key, but still receiving "Basic authentication with passwords is deprecated" error

Alexander Harrison
June 22, 2022

Hi Team,

 

I am in the process of updating our company's basic authentication with user/password to email/API key.

 

According to this (https://support.atlassian.com/atlassian-account/docs/manage-api-tokens-for-your-atlassian-account), I should be able to update the username with an email and the password with an API key and make this request successfully:

curl -v https://<company>.atlassian.net --user <user>@<company>.com:<b64key>

 

This request fails with this error:

* Server auth using Basic with user '<user>@<company>.com'
> GET / HTTP/1.1
> Host: <company>.atlassian.net
> Authorization: Basic <removed>
> User-Agent: curl/7.64.1
> Accept: */*
>
< HTTP/1.1 401 Unauthorized
< Date: Wed, 22 Jun 2022 23:10:14 GMT
< Content-Type: text/plain
< Server: globaledge-envoy
< X-Envoy-Upstream-Service-Time: 1
< Expect-Ct: report-uri="https://web-security-reports.services.atlassian.com/expect-ct-report/atlassian-proxy", max-age=86400
< Strict-Transport-Security: max-age=63072000; preload
< X-Content-Type-Options: nosniff
< X-Xss-Protection: 1; mode=block
< Atl-Traceid: 29224f439162d46d
< Report-To: {"group": "endpoint-1", "max_age": 600, "endpoints": [{"url": "https://dj9s4kmieytgz.cloudfront.net"}], "include_subdomains": true}
< Nel: {"report_to": "endpoint-1", "max_age": 600, "include_subdomains": true, "failure_fraction": 0.001}
< Vary: Accept-Encoding
< Transfer-Encoding: chunked
<
Basic authentication with passwords is deprecated. For more information, see: https://developer.atlassian.com/cloud/confluence/deprecation-notice-basic-auth/
* Connection #0 to host <company>.atlassian.net left intact
* Closing connection 0

 

 

What do I need to do to make the example request work?

 

Thank you!

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Morgan DUBUISSON
Contributor
June 22, 2022

Hi,


I don't quite understand the request.


Is it possible to give a little more detail on the need?

Alexander Harrison
June 23, 2022

Hi Morgan,

 

In the last several months, basic authentication using a username and password has been deprecated in favor of using an email address with an API token. 

 

According to this article (https://support.atlassian.com/atlassian-account/docs/manage-api-tokens-for-your-atlassian-account/), the only thing that needs to be updated are the credentials, and that the following request should be able to be made successfully:

curl -v https://<company>.atlassian.net --user <user>@<company>.com:<b64key>

 

However, running this request results in this error:

Basic authentication with passwords is deprecated. For more information, see: https://developer.atlassian.com/cloud/confluence/deprecation-notice-basic-auth/

 

What do I need to do to make requests using an email address and an API token? 

Morgan DUBUISSON
Contributor
June 23, 2022

Hi,
You can look at the following documentation : https://support.atlassian.com/atlassian-account/docs/manage-api-tokens-for-your-atlassian-account/

Available for further explanation

Alexander Harrison
June 23, 2022

Hi,

 

I have already looked at that article (and linked to it in both my reply and my original post). 

Morgan DUBUISSON
Contributor
June 23, 2022
Alexander Harrison
June 23, 2022

This is not a problem with API usage, it is a problem with migrating from the deprecated authentication scheme using username/password to the new scheme which uses email/API key.

Sachin Dahiya
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 18, 2022

Hi @Alexander Harrison I am facing the same problem. When i try to use email id as user name and API key as password, I am getting the same error related to 'Basic auth depreciation'. Did you ever find the solution to this?

 

Thanks,

Sachin

Morgan DUBUISSON
Contributor
September 13, 2022

Hello,

I come back on the subject to bring my help.


Can you give me an example that is wrong.

Sachin Dahiya
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 13, 2022

Thanks for your response, Morgan. We figured out what was wrong. Jira admin had generated the API key from the wrong place as it seems like we can generate API tokens in Jira from two different places. So, regenerating the API token at correct place fixed our issue.

 

Thanks,

Sachin

Andreas Dalegaard
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 14, 2022

Thanks, this solved my issue also.

 

To add a bit

 

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

 

This is the correct place to add the api key

DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events