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 Nov 29, 2018 in New to Confluence

How to use Confluence Cloud for stakeholder management

Most of us don’t need much convincing that stakeholder management is important. It just makes sense that keeping everyone in-the-know on projects and assigning clearly defined roles is key to having ...

1,120 views 2 6
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