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

# Custom authentication

See [Authentication](/cloud/reference/api/data_api/authentication) for the default behavior of the DataSourceClient.

## Override the API key

```python theme={null}
from domino.data_sources import DataSourceClient

custom_api_key = "VALID_API_KEY"

client = DataSourceClient(api_key=custom_api_key)
db = client.get_datasource("my-db")
```

```r theme={null}
library(DominoDataR)
client <- DominoDataR::datasource_client(api_key = custom_api_key)
```

## Override the location of the token file

```python theme={null}
from domino.data_sources import DataSourceClient

custom_token_file = "/valid/token/file/location"

client = DataSourceClient(token_file=custom_token_file)
db = client.get_datasource("my-db")
```

```r theme={null}
library(DominoDataR)
client <- DominoDataR::datasource_client(token_file = "/valid/token/file/location")
```
