Hello,
I am trying to get a curl command to work with basic authentication to retrieve the description of an issue. When I run the curl command, I get an HTTP 404 response with this data:
{"errorMessages":["Issue does not exist or you do not have permission to see it."],"errors":{}}[
The command I am trying is...
curl -D- -u myemailaddress:APIToken -X GET -H "Content-Type: application/json" https://ourdomain.atlassian.net/rest/api/3/issue/PROJ-1234
If I log in through a web browser as myemailaddress and then paste the exact URL (https://ourdomain.atlassian.net/rest/api/3/issue/PROJ-1234) into the browser, I get the expected result.
I get the same result for "/rest/api/2" and "/rest/api/3" (works in browser not from CURL.
The API token was created by while logged in as myemailaddress as outlined here: https://confluence.atlassian.com/cloud/api-tokens-938839638.html
I have not found anywhere the API needs to be "enabled" in general or for a specific token. I have not found anywhere that the token has to be permissioned independently from the user to whom the token belongs.
Note this is not an authentication issue with the username/password (-u) of the curl command. If those are wrong, the response I see for that is HTTP 401 - Authentication Failed.
Thanks in advance for any suggestions (or answers!),
John