Basic authentication with passwords is deprecated

Kamran786 July 8, 2020

Hi Team,

I have below details with me:-

1.API Token

2.Correct URI

3.Correct User Name

4.Rest API :- rest/api/3/project(to see all the projects)

Used Authorization as Basic Auth and username as email address and password as the API token key.

I hit this api via Postman and i am getting error as :-

Basic authentication with passwords is deprecated. For more information, see: https://confluence.atlassian.com/cloud/deprecation-of-basic-authentication-with-passwords-for-jira-and-confluence-apis-972355348.html

 

Please suggest what am i missing here.

 

Regards,

kamran

 

5 answers

1 accepted

3 votes
Answer accepted
Kamran786 July 13, 2020
Italo Qualisoni [e-Core]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 13, 2020

Cool! thanks for sharing

2 votes
Italo Qualisoni [e-Core]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 8, 2020

Hi @Kamran786 ,

You should not use email and password as username.

Your username should be only your email  and the password will be API Token.

api.png

Kamran786 July 8, 2020

Hi @Italo Qualisoni [e-Core] 

I am using username as email address only and password as api token. Still I am getting error. 

 

Regards

Kamran

Italo Qualisoni [e-Core]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 8, 2020

Can you check if your Authorization header is with the right information?

I've an issue in the past that my Postman was not updating the Authorization header and I had to create a new request from scratch.

Kamran786 July 8, 2020

Hi @Italo Qualisoni [e-Core] 

 

For this api there is authorization header being used. Please check the api in jira documentation. 

 

So i have not used anything in header. 

 

Regards

Kamran

Italo Qualisoni [e-Core]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 8, 2020

@Kamran786 ,

Postman automatically add the Authorization header for you with your basic authentication email:apiKey  based64 encoded , when I mention my issue for some reason my Postman was keeping my old header instead of update with my new credential.

 

Also I've just checked that if your apiKey is not correct you will receive the same error "Basic authentication with passwords is deprecated", can you generate a new api key and try it again updating your password with the new generated key? 

Here are the instructions to generate a new key:

https://confluence.atlassian.com/cloud/api-tokens-938839638.html

 

If you have Linux you can check by running this command:

curl -v https://mysite.atlassian.net/rest/api/3/project --user me@example.com:my-api-token

 

Like Nav likes this
Daniel Shorten July 12, 2020

I am experiencing the exact same issue, same commands worked fine last month. Today not working.

I generated a new API key, same result.

 

curl -u $EMAIL$:$API KEY$  -X DELETE -H "Content-Type: application/json" https://XXX.atlassian.net/rest/api/3/group/user?groupname=jira-software-users\&\accountId=$ACCOUNT ID$ && echo done1 &

Daniel Shorten July 12, 2020

OK - User error.

 

I had an additional space which had crept into my command at the end of the API key. Removed the space and all good again.

1 vote
Lionel.Arnaud June 7, 2021

Is this still working ?

I am using Postman, passing Authorization header with email:API token (base64 encoded).

but still get the Basic authentication with passwords is deprecated error message.

(in Jira i can see the key is accessed)

0 votes
I Putu Ashadi Sedana Pratama September 18, 2022

I also experience a similar with you.

the problem is solved after you create a new token and it works now.

the detail at Postman can be seen below.

 

Screen Shot 2022-09-18 at 17.00.16.png

0 votes
Hürkan Utan February 27, 2021

Hey Guys,

i am so sorry to "revive" this thread. But i am trying to connect to the rest API via Zapier, with a custom Webhook and i get the same error message. I am doing it as @Italo Qualisoni [e-Core]  described in his first reply:

"Your username should be only your email  and the password will be API Token."

i also generated a new Api Token - but same result.

Any ideas on what i can do?

thanks in advance guys ^^

Cheers,

Hürkan

Italo Qualisoni [e-Core]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 3, 2021

Hey @Hürkan Utan ,

This happens when your authorization isn't set properly.

I recommend to test your API Token in Postman first and once you can confirm the token is working, I recommend you to move to Zapier.

 

In Postman you can use the basic authentication, with your mail as username and token as password (same as my screenshot in previous threads)

 

Let us know if your token works in Postman, you can test using the below endpoint to check the status of your site.

https://mysite.atlassian.net/status
Like Hürkan Utan likes this
Hürkan Utan March 4, 2021

Hey @Italo Qualisoni [e-Core]  ,

I tested as you said - first in Postman and i used basic auth. in Postman and i successfully could change the summary. Following are some screenshots :)

the original Summary was "Test" and now its changed.

Screenshot 2021-03-04 at 20.43.11.pngScreenshot 2021-03-04 at 20.43.24.png

And the API key seems to be working just fine.Screenshot 2021-03-04 at 20.45.27.png

Now i want to change the approver of the Ticket. Should i test it in Postman first as well? If so how do is search for the field because the customfield i had originally is not working.

 

Soo i searched in the Raw data and found that custom field

customfield_10003 - actually sets the approver but when i trx to change it with the another ID i get this error:

Screenshot 2021-03-04 at 21.01.23.png

Thanks for all your Help @Italo Qualisoni [e-Core] ^^

Cheers,

Hürkan

Hürkan Utan March 4, 2021

@Italo Qualisoni [e-Core] 

its me again xD ^^

when i try to do it this way: Screenshot 2021-03-04 at 21.21.03.png

i get the error -  i checked the edit screen, but the field "Approvers" is included there

any other ideas on how to do it ^^ ?

Cheers,

Hürkan

Hürkan Utan March 4, 2021

Heyho @Italo Qualisoni [e-Core]  ^^

actually this did it:

{ "fields":{ "customfield_10003": [{ "id": "5e2aed960fa3a90c9eb76755" } ] }}

now i believe i only need the authentication for Zapier? @Italo Qualisoni [e-Core] 

Again massive thanks for your Help ^^

Italo Qualisoni [e-Core]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 4, 2021

Hey @Hürkan Utan !

Great progress!

 

Once you make it work in Postman, you should be able to configure Zapier using the same payload and authentication Header.

 

Keep us updated with your findings!

Like Hürkan Utan likes this
Hürkan Utan March 5, 2021

Hey @Italo Qualisoni [e-Core]  ,

 

sooo to update the Zap worked ^^

thanks for your Help - additionally i tried to configure the Basic auth in Zapier, which

did not work. However when i copied the Authorization header from Postman it did

function as intended :)

now i just need to figure out how to move the issue to another state ^^

Thanks and Cheers

Hürkan

Hürkan Utan March 5, 2021

@Italo Qualisoni [e-Core] 

quick update again its working perfectly thanks again ^^

Italo Qualisoni [e-Core]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 5, 2021

Awesome @Hürkan Utan , I'm happy I could help you!

Have a great weekend and stay safe!

Like Hürkan Utan likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events