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

# Member

> Cashback Hive SDK member API reference: read the signed-in member's profile, cashback balances and recent activity with member.current() and member.activity().

These methods concern the currently signed-in member. See [Members and authentication](https://developer.cashbackhive.com/guides/members-and-auth.md) for how a member becomes signed in.

## `member.current()`

Synchronously return the cached member profile.

```ts theme={null}
member.current(): Member | null
```

**Returns** the [`Member`](https://developer.cashbackhive.com/reference/types#member) if one has been fetched since page load, otherwise `null`. Note that `null` doesn't necessarily mean signed out: on a returning visit the token is present immediately, but the profile is fetched in the background. Use [`auth:change`](https://developer.cashbackhive.com/reference/events#auth-change) to be notified when it arrives.

```ts theme={null}
const member = sdk.member.current();
if (member) console.log(member.balances.confirmed);
```

## `member.get()`

Fetch the member profile from the API.

```ts theme={null}
member.get(): Promise<Member | null>
```

**Returns** `null` immediately if no token is stored. Otherwise fetches `/v1/member`, updates the cache (emitting `auth:change` if the member changed), and resolves with the [`Member`](https://developer.cashbackhive.com/reference/types#member). Rejects with an [`SdkApiError`](https://developer.cashbackhive.com/reference/errors) if the API fails — typically `401` for an expired token.

```ts theme={null}
const member = await sdk.member.get();
```

> [!NOTE]
>
> You rarely need to call this yourself. The SDK calls it during initialisation when a token exists, and after `auth.signIn()` succeeds.

## `member.activity()`

Fetch the member's recent cashback transactions.

```ts theme={null}
member.activity(params?: { limit?: number; offset?: number }): Promise<ActivityResult>
```

**params.limit** `number`

Maximum number of items to return.

**params.offset** `number` (default: 0)

Number of items to skip, for pagination.

**Returns**

**activity** `ActivityItem[]`

Transactions, most recent first. See [`ActivityItem`](https://developer.cashbackhive.com/reference/types#activityitem).

**total** `number`

Total number of transactions.

**Throws** synchronously with `[CashbackHive] member is not signed in` if no token is stored. Check `auth.isSignedIn()` first.

```ts theme={null}
if (sdk.auth.isSignedIn()) {
  const { activity } = await sdk.member.activity({ limit: 10 });
  for (const item of activity) {
    console.log(item.brandName, item.status, item.cashback, item.currency);
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.