I want to authenticate to our confluence server via curl.
I use
curl https://<MY HOST>/rest/pat/latest/tokens -H "Authorization: Bearer <MY PAT>"-H "Content-Type: application/json"
which results in
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><status><status-code>401</status-code><message>Client must be authenticated to access this resource.</message></status>
I also tried
curl https://<MY HOST>/rest/pat/latest/tokens -H "Authorization: Basic username:password"-H "Content-Type: application/json"
All results in the above response. When I call the /rest/pat/latest/tokens via browser after successful login I receive the correct tokens.
Are there any additional configuration settings in confluence to make the curl requests work?
Thanks in advance!