---
url: >-
  https://game-engine-io.github.io/enginex-frontend-sdk/reference/api/@getenginex/sdk/interfaces/ResponsibleGamblingApi.md
---
[Reference](../../../index.md) / [@getenginex/sdk](../index.md) / ResponsibleGamblingApi

# ResponsibleGamblingApi

Responsible gambling: deposit, loss and session time limits, self-exclusion and reality check.
All methods require login. Limit changes only take effect after 24 h (a gateway rule).
Compliance errors (`SELF_EXCLUDED`, `COOLING_OFF`, ...) sometimes arrive as HTTP 500: always decide
by `error.code`.

## Methods

### getLimits()

> **getLimits**(`params?`, `options?`): `Promise`<[`ResponsibleGamblingLimits`](ResponsibleGamblingLimits.md)>

The logged-in player's limits and current usage.

#### Parameters

##### params?

[`NoParams`](../type-aliases/NoParams.md)

##### options?

[`CallOptions`](CallOptions.md)

#### Returns

`Promise`<[`ResponsibleGamblingLimits`](ResponsibleGamblingLimits.md)>

#### Example

```ts
const { deposit, selfExclusion } = await enginex.responsibleGambling.getLimits()
if (deposit.daily.limit !== null) showUsage(deposit.daily.used, deposit.daily.limit)
```

#### Throws

`UNAUTHENTICATED` without a session; `VALIDATION_ERROR` with `validation: 'strict'`
if the gateway sends a date that is not a date, and also in `'warn'` with a money value outside
the format.

***

### getRealityCheck()

> **getRealityCheck**(`params?`, `options?`): `Promise`<[`RealityCheck`](RealityCheck.md)>

Data for the reality check notice: session limit, the day's deposit and loss limit. The gateway
does not track the session time (it returns the limits as an approximation): the app measures the time.

#### Parameters

##### params?

[`NoParams`](../type-aliases/NoParams.md)

##### options?

[`CallOptions`](CallOptions.md)

#### Returns

`Promise`<[`RealityCheck`](RealityCheck.md)>

#### Example

```ts
const { sessionTimeLimitMinutes } = await enginex.responsibleGambling.getRealityCheck()
```

#### Throws

`UNAUTHENTICATED` without a session; `VALIDATION_ERROR` in `strict` with an
unexpected format, and also in `'warn'` with a money value outside the format.

***

### selfExclude()

> **selfExclude**(`input`, `options?`): `Promise`<[`SelfExclusionResult`](SelfExclusionResult.md)>

Self-exclusion of the logged-in player. **A serious action and, in practice, irreversible for the player**: ask for
explicit confirmation before calling. A `duration` outside the list, missing or of another type
rejects before any request.

#### Parameters

##### input

[`SelfExcludeInput`](SelfExcludeInput.md)

##### options?

[`CallOptions`](CallOptions.md)

#### Returns

`Promise`<[`SelfExclusionResult`](SelfExclusionResult.md)>

#### Example

```ts
if (await confirmDialog('This will block your account for 30 days. Continue?')) {
  await enginex.responsibleGambling.selfExclude({ duration: '30d' })
}
```

#### Throws

`CONFIGURATION_ERROR` (without a request) for an invalid `duration`;
`UNAUTHENTICATED` without a session; `SELF_EXCLUDED`, `COOLING_OFF`, `ACCOUNT_BLOCKED` and others from the
compliance service by `code` (some as HTTP 500).

***

### setLimits()

> **setLimits**(`input`, `options?`): `Promise`<[`SetLimitsResult`](SetLimitsResult.md)>

Sets limits. Only the fields present are sent; `null` removes the limit (sends `0`, inferred).
The gateway applies the change in 24 h (the response is `updatedAt`, not the new limits): reread with
[ResponsibleGamblingApi.getLimits](#getlimits) afterwards.

#### Parameters

##### input

[`SetLimitsInput`](SetLimitsInput.md)

##### options?

[`CallOptions`](CallOptions.md)

#### Returns

`Promise`<[`SetLimitsResult`](SetLimitsResult.md)>

#### Example

```ts
await enginex.responsibleGambling.setLimits({ dailyDeposit: 50_000, weeklyDeposit: null })
```

#### Throws

`CONFIGURATION_ERROR` (without a request) if the input is not an object, carries
no field, or a value is not a safe integer ≥ 0 (nor `null`); `UNAUTHENTICATED` without a session;
compliance service errors passed through by `code` (some as HTTP 500).
