---
title: BimWorksClientFactory
summary: Class in BIM.works_SDK.
order: 10
languages: [csharp]
sdk-package: .NET · BIM.works_SDK
---

# BimWorksClientFactory

[[page:reference/dotnet/api|API catalogue]] · `BIM.works_SDK` · Class

````csharp sdk=dotnet sdk-namespace="BIM.works_SDK"
public class BimWorksClientFactory : IDisposable
````

The factory is used to create [[page:reference/dotnet/bim-works-sdk/bimworksclient-38b8aecc|BimWorksClient]] objects. The factory object is supposed to be a long-lived object. Ideally you only create one factory for each target BIM.works Repository

## Inheritance and interfaces

- `System.Object`
- `System.IDisposable`

## Members

| Member | Kind | Description |
|---|---|---|
| [[page:reference/dotnet/bim-works-sdk/bimworksclientfactory-6a18d580#member-ctor-3d79540ceb5f|BimWorksClientFactory(Uri)]] | Constructor |  |
| [[page:reference/dotnet/bim-works-sdk/bimworksclientfactory-6a18d580#member-createanonymousclient-471e0ce82197|CreateAnonymousClient()]] | Method | Create a new BimWorksClient with anonymous authentication. The set of allowed API calls is very limited for anonymous users. |
| [[page:reference/dotnet/bim-works-sdk/bimworksclientfactory-6a18d580#member-createclientwithapitoken-c0683e6bf8db|CreateClientWithApiToken(string)]] | Method | Create a new BimWorksClient with an API Token |
| [[page:reference/dotnet/bim-works-sdk/bimworksclientfactory-6a18d580#member-createclientwithauth-721bfe4aa768|CreateClientWithAuth(AuthToken)]] | Method | Create a new BimWorksClient with a given AuthToken. This is not used often on server systems. |
| [[page:reference/dotnet/bim-works-sdk/bimworksclientfactory-6a18d580#member-createclientwithusernamepassword-f0fdd828a46f|CreateClientWithUsernamePassword(string, string)]] | Method | Create a new BimWorksClient with username/password authentication. Generally it is recommended to only use this for development/testing purposes. In most cas… |
| [[page:reference/dotnet/bim-works-sdk/bimworksclientfactory-6a18d580#member-dispose-42a4b82d68ac|Dispose()]] | Method |  |
| [[page:reference/dotnet/bim-works-sdk/bimworksclientfactory-6a18d580#member-excludeplatforminfo-14c3aed992dd|ExcludePlatformInfo()]] | Method | Leaves the .NET version and the operating system out of what the clients created afterwards send. The SDK's own name, version and build are always sent: supp… |
| [[page:reference/dotnet/bim-works-sdk/bimworksclientfactory-6a18d580#member-setapplication-9b54797b0b06|SetApplication(string, string)]] | Method | Names your application, sent with every request of the clients created afterwards (the app of the X-BIMworks-Client header and the end of the User-Agent). It… |

## `BimWorksClientFactory(Uri)` {#member-ctor-3d79540ceb5f}

````csharp sdk=dotnet sdk-namespace="BIM.works_SDK"
public BimWorksClientFactory(Uri address)
````



### Parameters

| Name | Type | Description |
|---|---|---|
| `address` | `System.Uri` |  |

## `CreateAnonymousClient()` {#member-createanonymousclient-471e0ce82197}

````csharp sdk=dotnet sdk-namespace="BIM.works_SDK"
public BimWorksClient CreateAnonymousClient()
````

Create a new BimWorksClient with anonymous authentication. The set of allowed API calls is very limited for anonymous users.

## `CreateClientWithApiToken(string)` {#member-createclientwithapitoken-c0683e6bf8db}

````csharp sdk=dotnet sdk-namespace="BIM.works_SDK"
public BimWorksClient CreateClientWithApiToken(string apiToken)
````

Create a new BimWorksClient with an API Token

### Parameters

| Name | Type | Description |
|---|---|---|
| `apiToken` | `System.String` |  |

## `CreateClientWithAuth(AuthToken)` {#member-createclientwithauth-721bfe4aa768}

````csharp sdk=dotnet sdk-namespace="BIM.works_SDK"
public BimWorksClient CreateClientWithAuth(AuthToken authToken)
````

Create a new BimWorksClient with a given AuthToken. This is not used often on server systems.

### Parameters

| Name | Type | Description |
|---|---|---|
| `authToken` | [[page:reference/dotnet/bim-works-sdk/authtoken-dc72e245|AuthToken]] |  |

## `CreateClientWithUsernamePassword(string, string)` {#member-createclientwithusernamepassword-f0fdd828a46f}

````csharp sdk=dotnet sdk-namespace="BIM.works_SDK"
public BimWorksClient CreateClientWithUsernamePassword(string username, string password)
````

Create a new BimWorksClient with username/password authentication.
Generally it is recommended to only use this for development/testing purposes. In most cases using an API Token is better.

### Parameters

| Name | Type | Description |
|---|---|---|
| `username` | `System.String` |  |
| `password` | `System.String` |  |

## `Dispose()` {#member-dispose-42a4b82d68ac}

````csharp sdk=dotnet sdk-namespace="BIM.works_SDK"
public virtual void Dispose()
````



## `ExcludePlatformInfo()` {#member-excludeplatforminfo-14c3aed992dd}

````csharp sdk=dotnet sdk-namespace="BIM.works_SDK"
public BimWorksClientFactory ExcludePlatformInfo()
````

Leaves the .NET version and the operating system out of what the clients created afterwards send. The SDK's own
name, version and build are always sent: support needs them

## `SetApplication(string, string)` {#member-setapplication-9b54797b0b06}

````csharp sdk=dotnet sdk-namespace="BIM.works_SDK"
public BimWorksClientFactory SetApplication(string name, string version)
````

Names your application, sent with every request of the clients created afterwards (the app of the X-BIMworks-Client
header and the end of the User-Agent). It tells BIM.works support which of your integrations made a call.
Letters, digits and . _ + -; anything else becomes _

### Parameters

| Name | Type | Description |
|---|---|---|
| `name` | `System.String` |  |
| `version` | `System.String` |  |

## Inherited members

- `System.Object.Equals(System.Object)`
- `System.Object.Equals(System.Object,System.Object)`
- `System.Object.GetHashCode`
- `System.Object.GetType`
- `System.Object.MemberwiseClone`
- `System.Object.ReferenceEquals(System.Object,System.Object)`
- `System.Object.ToString`
