Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Rest API (Confluence Server) Authentication

EmadAfaqKhan September 24, 2018

I cant seem to authenticate using curl. I get 404, Page, content, space exists but no access.

curl -D- -u username:password -X GET -H "Content-Type: application/json" https://[domain]/confluence/rest/api/content/

Did base 64 encoding and just went to a single page and tried to authenticate etc. it connects but doesn't authenticate. Please advise. I a very new to APIs
I also had to use -k in my curl command as it gave me this

"curl failed to verify the legitimacy of the server and therefore could not

establish a secure connection to it. To learn more about this situation and

how to fix it, please visit the web page mentioned above."

Thanks

1 answer

1 vote
Shannon S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 25, 2018

Hi Emad,

I would recommend having a look at the example below:

As well as information from Using the Rest APIs, specifically:

Use HTTP basic authentication (Authorization HTTP header) containing ‘Basic username:password’. Please note however, username:password must be base64 encoded. The URL must also contain the ‘os_authType=basic’ query parameter.

Regards,

Shannon

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events