# What Jira REST returns without credentials

URL: https://goingstellar.ro/reference/atlassian-rest-api/anonymous-requests/

Jira applies the same permission rules to REST calls as to the web UI, so an unauthenticated call is an anonymous user. Endpoints that need a signed-in user answer 401, but an endpoint that looks up a work item answers 404 with the same message used for a work item that does not exist. A 404 on a key you know exists is therefore often a credential or permission problem.

## Endpoints

| Method | Path | What it does |
|---|---|---|
| GET | `/rest/api/3/myself` | Needs a signed-in user, so it answers 401 without credentials. |
| GET | `/rest/api/3/issue/{issueIdOrKey}` | Answers 404 when the work item is missing or the caller cannot see it, anonymous or not. |

## Examples

### GET /rest/api/3/myself

Calls an endpoint that always needs a user, with no Authorization header.

```bash
curl \
  -H 'Accept: application/json' \
  'https://your-domain.atlassian.net/rest/api/3/myself'
```

```python
import requests

r = requests.get(
    'https://your-domain.atlassian.net/rest/api/3/myself',
    headers={'Accept': 'application/json'},
)
print(r.status_code, r.text)
```

Response: HTTP 401

```
Client must be authenticated to access this resource.
```

Response headers:

```
Www-Authenticate: OAuth realm="https%3A%2F%2Fyour-domain.atlassian.net"
```

Sent to Atlassian Cloud on 29 Nov 2026.

### GET /rest/api/3/issue/{issueIdOrKey}

Calls a work item endpoint without credentials and gets a not-found style answer instead of 401.

```bash
curl \
  -H 'Accept: application/json' \
  'https://your-domain.atlassian.net/rest/api/3/issue/{issueIdOrKey}'
```

```python
import requests

r = requests.get(
    'https://your-domain.atlassian.net/rest/api/3/issue/{issueIdOrKey}',
    headers={'Accept': 'application/json'},
)
print(r.status_code, r.text)
```

Response: HTTP 404

```
{
 "errorMessages": [
  "Issue does not exist or you do not have permission to see it."
 ],
 "errors": {}
}
```

Sent to Atlassian Cloud on 29 Nov 2026.

### GET /rest/api/3/issue/WEB-999999

Calls with valid credentials for a key that does not exist and gets the identical message, so the two cases cannot be told apart from the body.

```bash
curl \
  -u "you@example.com:$ATLASSIAN_API_TOKEN" \
  -H 'Accept: application/json' \
  'https://your-domain.atlassian.net/rest/api/3/issue/WEB-999999'
```

```python
import os
import requests

EMAIL = "you@example.com"
r = requests.get(
    'https://your-domain.atlassian.net/rest/api/3/issue/WEB-999999',
    auth=(EMAIL, os.environ["ATLASSIAN_API_TOKEN"]),
    headers={'Accept': 'application/json'},
)
print(r.status_code, r.text)
```

Response: HTTP 404

```
{
 "errorMessages": [
  "Issue does not exist or you do not have permission to see it."
 ],
 "errors": {}
}
```

Sent to Atlassian Cloud on 29 Nov 2026.

## How it behaves

- GET /rest/api/3/myself without credentials answers 401 with the plain text body Client must be authenticated to access this resource.
- That 401 response carries a Www-Authenticate header with an OAuth realm for the site.
- GET /rest/api/3/issue/{issueIdOrKey} without credentials answers 404 with errorMessages saying the work item does not exist or the caller lacks permission to see it.
- A missing key with valid credentials returns the same 404 body, so the API does not reveal whether a hidden work item exists.

## Where the documentation differs

`GET /rest/api/3/issue/{issueIdOrKey}`, sent to Atlassian Cloud on 29 Nov 2026.

The documentation: The OpenAPI description of GET /rest/api/3/issue/{issueIdOrKey} lists 401: "Returned if the authentication credentials are incorrect or missing."

What happened: A request with no credentials got 404 with "Issue does not exist or you do not have permission to see it." and no 401.

## Pitfalls

- Do not treat 404 on a work item as proof the key is wrong. With no or insufficient access the answer is the same 404.
- HTTP clients that wait for a Basic challenge before sending credentials will not get one for Basic. Send the Authorization header on the first request.
- The guides say anonymous access exists only where a permission is granted to Anyone, and that the REST API does not turn anonymous access on by default, even for actions the web UI allows.

## Questions and answers

### Why do I get 404 for a work item that exists?

Jira answers 404 both when the key does not exist and when the caller cannot see it. Missing credentials, a token for another site, or a missing Browse projects permission all give that body.

### Can I call Jira REST anonymously?

Only for operations marked as accessible anonymously, and only where the needed permission is granted to the Public group. Most operations answer 401 or 404 instead.

## Related

- [Basic auth with an API token](https://goingstellar.ro/reference/atlassian-rest-api/authentication-api-tokens/)
- [Error response formats](https://goingstellar.ro/reference/atlassian-rest-api/error-responses/)
- [HTTP status codes](https://goingstellar.ro/reference/atlassian-rest-api/http-status-codes/)
- [Get a work item](https://goingstellar.ro/reference/atlassian-rest-api/get-issue/)
- [The current user](https://goingstellar.ro/reference/atlassian-rest-api/myself-current-user/)

## Sources

- [Basic auth for REST APIs, Jira (Atlassian Developer)](https://developer.atlassian.com/cloud/jira/platform/basic-auth-for-rest-apis/)
- [The Jira Cloud platform REST API v3 (Atlassian Developer)](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/)
- [Get issue (Jira REST API v3)](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issues/#api-rest-api-3-issue-issueidorkey-get)
- [Get current user (Jira REST API v3)](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-myself/#api-rest-api-3-myself-get)

