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

# createIgaming()

> **createIgaming**(`client`): [`IgamingClient`](../interfaces/IgamingClient.md)

Creates the iGaming namespaces on top of a `@getenginex/sdk` client. It creates no session, tenant or
transport of its own and makes no request: call it once per client (in the browser, one per app;
on the server, one per request, together with the client).

After `enginex.dispose()`, `createIgaming` still accepts the client, but every iGaming method
rejects with `CONFIGURATION_ERROR`, like the core methods.

## Parameters

### client

[`EnginexClient`](../../sdk/interfaces/EnginexClient.md)

The client returned by `createEnginexClient` (the object itself, not a copy).

## Returns

[`IgamingClient`](../interfaces/IgamingClient.md)

## Example

```ts
import { createEnginexClient } from '@getenginex/sdk'
import { createIgaming } from '@getenginex/sdk-igaming'

export const enginex = createEnginexClient({ locale: 'pt-BR' })
export const igaming = createIgaming(enginex)
```

## Throws

`CONFIGURATION_ERROR` if `client` is not a client created by
`createEnginexClient` (e.g. an arbitrary object or a `{ ...enginex }` copy), or if it was created
by an incompatible copy of `@getenginex/sdk` (install a single core version). Identify
with `isEnginexError(error, 'CONFIGURATION_ERROR')`.
