# Get My Profile

Read the signed-in user's own profile.

## Overview

There is no `GET /v1/users/me`: `/v1/users/me` only supports [PATCH](https://docs.aureahub.com/docs/users-me-update.md). To read the current user:

- use the `user` object returned by [Login](https://docs.aureahub.com/docs/auth-login.md), [Register](https://docs.aureahub.com/docs/auth-register.md) and the Google and Apple sign-in endpoints; or
- call [Get User](https://docs.aureahub.com/docs/users-get.md) with your own user ID, which is the `sub` claim of the access token.

## Endpoint

### `GET /v1/users/{id}`

Authentication: bearer token required.

Returns a user of the caller's tenant by ID. Pass the sub claim of your access token to read your own profile.

**Path parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | yes | User UUID. For your own profile, the sub claim of the access token |

**Responses**

`200` OK

```json
{
  "id": "0b7c1e52-4a9d-4f3e-8c21-6d5a9e3f7b10",
  "username": "alice",
  "email": "alice@example.com",
  "displayName": "Alice",
  "qrCode": "data:image/png;base64,…",
  "status": "active",
  "role": "user",
  "createdAt": "2026-09-01T10:00:00.000Z",
  "updatedAt": "2026-09-10T08:30:00.000Z"
}
```

## Implementation

```javascript
// Reads the sub claim without verifying the token — fine for your own access token
function userIdFromToken(accessToken) {
  const payload = accessToken.split('.')[1].replace(/-/g, '+').replace(/_/g, '/');
  return JSON.parse(atob(payload)).sub;
}

async function getMyProfile(accessToken) {
  const res = await fetch(`https://api.aureahub.com/v1/users/${userIdFromToken(accessToken)}`, {
    headers: { Authorization: `Bearer ${accessToken}` }
  });
  if (!res.ok) throw new Error(`Profile request failed: ${res.status}`);
  return res.json();
}
```

---

Web version: https://docs.aureahub.com/#users-me
