Confluence REST API not working Edited


We are having issue when accessing our Confluence rest api via curl command using basic authentication. The rest api in Confluence are correctly configured but when accessing the rest api, we are getting 401 UNAUTHORIZED AUTHENTICATION_FAILED. We are using SSO and the user that we are currently using to access the rest api is an internal directory user (user manually created in Confluence).

Below are the curl commands we've tried:

* curl -u <username>:<password> -X GET -H "Content-Type: application/json" "https://<confluenceurl>/wiki/rest/api/content/"

* curl -X GET -H "Content-Type: application/json" -H "Authorization: Basic <token>" "https://<confluenceurl>/wiki/rest/api/content?os_authType=basic"

* curl commands mentioned in (using cookies and config file)

We are using Confluence v5.8.5 and Confluence http authenticator v2.6.1 ( By the way, the confluence api urls are accessible via browser and we are getting the json result.

Is anyone encountered the same issue and know the resolution? Is this a bug in Confluence with using http authenticator?

1 answer

Same issue encountered. Any fix available now?


Many thanks,

Prem Sree

Provide output with curl -vvv option.

sending using POSTMAN.


Status as "200 ok" but not authenticating  as expected, even accepts incorrect credentials.

URL used:

Response Header:

Age →0

Connection →keep-alive

Content-Length →0

Date →Wed, 18 Apr 2018 12:21:53 GMT

Server →Apache-Coyote/1.1

Via →1.1 localhost.localdomain




Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Oct 24, 2018 in Confluence

Atlassian Research opportunity with Confluence templates

Do you use templates with Confluence? Take part in a remote 1-hr workshop. You'll receive USD $100 for your time!   We're looking for people to participate in a   remote 1-hr workshop...

1,098 views 17 14
Join discussion

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