> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hackgate.io/llms.txt
> Use this file to discover all available pages before exploring further.

# GET /api/account/currentUser — user profile

> GET /api/account/currentUser returns your user profile. If you are a new user, your account is created automatically on first call.

Use this endpoint to retrieve the profile of the currently authenticated user. The response confirms the identity tied to the Bearer token you are using. If the token belongs to a user who has never accessed the HackGATE API before, the system automatically provisions their account on first call — no separate registration step is required.

## Endpoint

```
GET https://api-admin.hackgate.io/api/account/currentUser
```

## Request

<ParamField header="Authorization" type="string" required>
  Bearer token. See [Authentication](/api/authentication).
</ParamField>

## Response

<ResponseField name="email" type="string">
  The email address associated with the authenticated user's account.
</ResponseField>

## Behavior

* **Existing user** — returns the profile for the account already on record.
* **New user** — if no account exists for the authenticated identity, HackGATE creates one automatically and returns the new profile. You do not need to call a separate registration endpoint.

## Example

```bash theme={null}
curl https://api-admin.hackgate.io/api/account/currentUser \
  -H "Authorization: Bearer <token>"
```

```json theme={null}
{
  "email": "researcher@example.com"
}
```
