The below command requests my password and then succeeds.
curl -u MyUsername -p -X PUT -H "Content-Type: application/json" --data '{"update":{"labels":[{"add":"test"}]}}' MyURL:8080/rest/api/latest/issue/TicketID
Following the basic authentication example. I would expect this to work using a token but I receive an access denied message.
curl -u MyEMAIL:MyToken -p -X PUT -H "Content-Type: application/json" --data '{"update":{"labels":[{"add":"test"}]}}' MyURL:8080/rest/api/latest/issue/TicketID
.
- (I also tried with username instead of email)
- The token was generated from my profile on the server. The username and email are also taken as shown on my profile.
Can anyone help? Ive also tried it this way (https://community.atlassian.com/t5/Jira-questions/How-to-authenticate-to-Jira-REST-API-with-curl/qaq-p/1312165), so it seems like the token does not work. Considering there's no options when generating one, is there really anything else to it beyond 'generate, copy, paste' that could cause an issue?