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

# configureClient

[API Reference](/api-reference/modelence/client/functions/../../../index) / [modelence](/api-reference/modelence/client/functions/../../index) / [client](/api-reference/modelence/client/functions/../index) / configureClient

> **configureClient**(`userConfig`): `void`

Defined in: [packages/modelence/src/client/clientConfig.ts:48](https://github.com/modelence/modelence/blob/b48f191b15e73c46387e3057f27e54c6ef6a8586/packages/modelence/src/client/clientConfig.ts#L48)

Configure the Modelence client for non-browser environments like React Native.

When configured, the client uses the provided functions for auth-token
storage, client-info collection, and URL resolution instead of the
default browser APIs (localStorage, window\.screen, relative URLs).

## Example

```ts theme={null}
import { configureClient } from 'modelence/client';
import { Linking } from 'react-native';

let authToken: string | undefined;

configureClient({
  baseUrl: 'https://myapp.com',
  getAuthToken: () => authToken,
  setAuthToken: (token) => { authToken = token ?? undefined; },
  getClientInfo: () => ({
    screenWidth: Dimensions.get('screen').width,
    screenHeight: Dimensions.get('screen').height,
    windowWidth: Dimensions.get('window').width,
    windowHeight: Dimensions.get('window').height,
    pixelRatio: PixelRatio.get(),
    orientation: null,
  }),
  openUrl: (url) => Linking.openURL(url),
});
```

## Parameters

| Parameter    | Type                                                                                   |
| ------------ | -------------------------------------------------------------------------------------- |
| `userConfig` | [`ClientConfig`](/api-reference/modelence/client/functions/../interfaces/ClientConfig) |

## Returns

`void`
