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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.