# Get the current user in the Confluence REST API

URL: https://goingstellar.ro/reference/atlassian-rest-api/confluence-current-user/

GET /wiki/rest/api/user/current returns the account behind the credentials: account id, type, display name, locale and status. The account id is the key that appears as authorId and ownerId in v2 responses.

## Endpoints

| Method | Path | What it does |
|---|---|---|
| GET | `/wiki/rest/api/user/current` | v1: returns the user of the request. |

## Examples

### GET /wiki/rest/api/user/current

Reads the account that sent the request.

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

```python
import os
import requests

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

Response: HTTP 200

```
{
 "type": "known",
 "accountId": "<accountId>",
 "accountType": "atlassian",
 "displayName": "<display name>",
 "isGuest": false,
 "locale": "en_US",
 "accountStatus": "active"
}
```

Sent to Atlassian Cloud on 29 Nov 2026.

### GET /wiki/api/v2/pages/{pageId}

A page read shows the same account as author and owner.

```bash
curl \
  -u "you@example.com:$ATLASSIAN_API_TOKEN" \
  -H 'Accept: application/json' \
  'https://your-domain.atlassian.net/wiki/api/v2/pages/{pageId}'
```

```python
import os
import requests

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

Response: HTTP 200

```
{
 "authorId": "<accountId>",
 "ownerId": "<accountId>",
 "version": {
  "number": 1,
  "authorId": "<accountId>"
 },
 "id": "33653083"
}
```

Sent to Atlassian Cloud on 29 Nov 2026.

### GET /wiki/api/v2/pages/{pageId}/versions

Each version of a page carries the author id of that save.

```bash
curl \
  -u "you@example.com:$ATLASSIAN_API_TOKEN" \
  -H 'Accept: application/json' \
  'https://your-domain.atlassian.net/wiki/api/v2/pages/{pageId}/versions'
```

```python
import os
import requests

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

Response: HTTP 200

```
{
 "results": [
  {
   "number": 4,
   "authorId": "<accountId>",
   "createdAt": "2026-11-29T17:31:56.228Z"
  },
  {
   "number": 3,
   "authorId": "<accountId>",
   "createdAt": "2026-11-29T17:31:55.007Z"
  }
 ]
}
```

Sent to Atlassian Cloud on 29 Nov 2026.

### GET /wiki/api/v2/spaces

A space has an owner id with the same shape.

```bash
curl -G \
  -u "you@example.com:$ATLASSIAN_API_TOKEN" \
  -H 'Accept: application/json' \
  --data-urlencode 'keys=SD' \
  'https://your-domain.atlassian.net/wiki/api/v2/spaces'
```

```python
import os
import requests

EMAIL = "you@example.com"
r = requests.get(
    'https://your-domain.atlassian.net/wiki/api/v2/spaces',
    auth=(EMAIL, os.environ["ATLASSIAN_API_TOKEN"]),
    headers={'Accept': 'application/json'},
    params={'keys': 'SD'},
)
print(r.status_code, r.text)
```

Response: HTTP 200

```
{
 "results": [
  {
   "spaceOwnerId": "<accountId>",
   "authorId": "<accountId>",
   "key": "SD"
  }
 ]
}
```

Sent to Atlassian Cloud on 29 Nov 2026.

## How it behaves

- The response has type "known", accountType "atlassian" and an accountStatus of active for a normal user (conf-user-current).
- The same accountId appears as authorId and ownerId in the v2 page, as authorId in each version and as spaceOwnerId in the space (conf-page-get, conf-page-versions, conf-spaces-v2).
- The v1 user response includes locale and profilePicture next to the id.

## Pitfalls

- The response includes the email field. Do not log it.
- An API token acts as the account that made it, so every page it writes shows that account as author.
- The call is v1. The v2 spec has no current-user path.

## Questions and answers

### Why do I need the account id?

Restrictions, mentions and filters take the account id, not the email.

## Related

- [Confluence REST API v1 vs v2](https://goingstellar.ro/reference/atlassian-rest-api/confluence-v1-vs-v2/)
- [Get a page](https://goingstellar.ro/reference/atlassian-rest-api/get-page/)
- [Page restrictions](https://goingstellar.ro/reference/atlassian-rest-api/page-restrictions/)
- [Footer comments](https://goingstellar.ro/reference/atlassian-rest-api/footer-comments/)
- [Spaces](https://goingstellar.ro/reference/atlassian-rest-api/spaces/)

## Sources

- [Get current user (Confluence REST API v1)](https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-users/#api-wiki-rest-api-user-current-get)
- [The Confluence Cloud REST API v1 (Atlassian Developer)](https://developer.atlassian.com/cloud/confluence/rest/v1/intro/)

