AUTHENTICATION_DENIED return when call confluence API Edited

Sometime result return correct, sometime return "HTTP Status 401 - Basic Authentication Failure - Reason : AUTHENTICATION_DENIED". I think API work unstable(Postman same)

I had used API : https://instance-name.atlassian.net/wiki/rest/api/content/pageId?expand=body.storage

 I had double with curl, restclient but both of them cannot get correct result

My ruby code :

authen = "Basic "+Base64.encode64( 'email:pass')
data = RestClient::Request.execute(:method => :get, :url => result_url, :headers => {"Authorization" => authen, "Accept" => "application/json, text/plain, */*"})

Anything I missing?

 Note : This code work well with API  https://instance-name.atlassian.net/rest/api/2/issue/issue-key
 
 
Son Nguyen

1 answer

I run into the same issue. Sometimes getting AUTHENTICATION_DENIED from the Api.

Reason is that after three failed logins the Api enables the captcha and the request fails.

By default, Captcha for failed logins is enabled and the number of failed login attempts is set to three.

To configure / disable this behavior see https://confluence.atlassian.com/doc/configuring-captcha-for-failed-logins-216957808.html

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Mar 12, 2019 in Confluence

Confluence Admin Certification now $150 for Community Members

More and more people are building their careers with Atlassian, and we want you to be at the front of this wave! Important Dates Start the Certification Prep Course by 2 April 2019 Take your e...

261 views 2 10
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you