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

# ClientIdentity

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

````csharp sdk=dotnet sdk-namespace="BIM.works_SDK"
public sealed class ClientIdentity
````

What this SDK says it is, on every request: the X-BIMworks-Client header, the User-Agent, and the first message of
its WebSocket. BIM.works support reads it to see which SDK, version and application made a call. Immutable: every
With... returns a new identity. The Java and JavaScript SDKs write the same format.

## Inheritance and interfaces

- `System.Object`

## Members

| Member | Kind | Description |
|---|---|---|
| [[page:reference/dotnet/bim-works-sdk/clientidentity-970af72e#member-create-50b1f2e62f7d|Create(string, string)]] | Method | A new identity for an SDK id, with this runtime and platform and a fresh instance id |
| [[page:reference/dotnet/bim-works-sdk/clientidentity-970af72e#member-forthissdk-1d980497811e|ForThisSdk()]] | Method | What this SDK is: dotnet, its version and commit (AssemblyInformationalVersion) and build time (AssemblyMetadata "BuildDate") |
| [[page:reference/dotnet/bim-works-sdk/clientidentity-970af72e#member-get-0f2c9d856791|Get(string)]] | Method | A field by its wire key (sdk, v, app, rt, inst, ...), or null |
| [[page:reference/dotnet/bim-works-sdk/clientidentity-970af72e#member-header-11d772bc277e|Header]] | Property | The value of X-BIMworks-Client |
| [[page:reference/dotnet/bim-works-sdk/clientidentity-970af72e#member-headername-259086fe8857|HeaderName]] | Field | The name of the header |
| [[page:reference/dotnet/bim-works-sdk/clientidentity-970af72e#member-hello-2c315041a584|Hello()]] | Method | The socket's first message: a heartbeat to servers that predate it, the identity to the others |
| [[page:reference/dotnet/bim-works-sdk/clientidentity-970af72e#member-tostring-2522248a461b|ToString()]] | Method |  |
| [[page:reference/dotnet/bim-works-sdk/clientidentity-970af72e#member-useragent-3ad272da2320|UserAgent]] | Property | bimworks-&lt;sdk&gt;/&lt;version&gt; (&lt;runtime&gt;; &lt;os&gt;) &lt;application&gt; |
| [[page:reference/dotnet/bim-works-sdk/clientidentity-970af72e#member-withapplication-6a7efd7aa2af|WithApplication(string, string)]] | Method | The application that uses the SDK, sent as name/version. Letters, digits and . _ + -; anything else becomes _ |
| [[page:reference/dotnet/bim-works-sdk/clientidentity-970af72e#member-withbuild-501942901c03|WithBuild(string, string, string)]] | Method | With the build's version, time (UTC, ISO 8601) and commit; a version of "DEV" or nothing is sent as dev |
| [[page:reference/dotnet/bim-works-sdk/clientidentity-970af72e#member-withspec-9acb6ab578c2|WithSpec(string, string, string)]] | Method | For an SDK generated from the OpenAPI spec: the spec's version, the first 12 hex digits of its SHA-256, and generator/version |
| [[page:reference/dotnet/bim-works-sdk/clientidentity-970af72e#member-withoutplatform-e22939c4dff7|WithoutPlatform()]] | Method | Without the runtime and the platform |

## `Create(string, string)` {#member-create-50b1f2e62f7d}

````csharp sdk=dotnet sdk-namespace="BIM.works_SDK"
public static ClientIdentity Create(string sdk, string lang)
````

A new identity for an SDK id, with this runtime and platform and a fresh instance id

### Parameters

| Name | Type | Description |
|---|---|---|
| `sdk` | `System.String` |  |
| `lang` | `System.String` |  |

## `ForThisSdk()` {#member-forthissdk-1d980497811e}

````csharp sdk=dotnet sdk-namespace="BIM.works_SDK"
public static ClientIdentity ForThisSdk()
````

What this SDK is: dotnet, its version and commit (AssemblyInformationalVersion) and build time (AssemblyMetadata "BuildDate")

## `Get(string)` {#member-get-0f2c9d856791}

````csharp sdk=dotnet sdk-namespace="BIM.works_SDK"
public string Get(string key)
````

A field by its wire key (sdk, v, app, rt, inst, ...), or null

### Parameters

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

## `Header` {#member-header-11d772bc277e}

````csharp sdk=dotnet sdk-namespace="BIM.works_SDK"
public string Header { get; }
````

The value of X-BIMworks-Client

## `HeaderName` {#member-headername-259086fe8857}

````csharp sdk=dotnet sdk-namespace="BIM.works_SDK"
public const string HeaderName = "X-BIMworks-Client"
````

The name of the header

## `Hello()` {#member-hello-2c315041a584}

````csharp sdk=dotnet sdk-namespace="BIM.works_SDK"
public string Hello()
````

The socket's first message: a heartbeat to servers that predate it, the identity to the others

## `ToString()` {#member-tostring-2522248a461b}

````csharp sdk=dotnet sdk-namespace="BIM.works_SDK"
public override string ToString()
````



## `UserAgent` {#member-useragent-3ad272da2320}

````csharp sdk=dotnet sdk-namespace="BIM.works_SDK"
public string UserAgent { get; }
````

bimworks-&lt;sdk&gt;/&lt;version&gt; (&lt;runtime&gt;; &lt;os&gt;) &lt;application&gt;

## `WithApplication(string, string)` {#member-withapplication-6a7efd7aa2af}

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

The application that uses the SDK, sent as name/version. Letters, digits and . _ + -; anything else becomes _

### Parameters

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

## `WithBuild(string, string, string)` {#member-withbuild-501942901c03}

````csharp sdk=dotnet sdk-namespace="BIM.works_SDK"
public ClientIdentity WithBuild(string version, string built, string commit)
````

With the build's version, time (UTC, ISO 8601) and commit; a version of "DEV" or nothing is sent as dev

### Parameters

| Name | Type | Description |
|---|---|---|
| `version` | `System.String` |  |
| `built` | `System.String` |  |
| `commit` | `System.String` |  |

## `WithSpec(string, string, string)` {#member-withspec-9acb6ab578c2}

````csharp sdk=dotnet sdk-namespace="BIM.works_SDK"
public ClientIdentity WithSpec(string spec, string specSha, string generator)
````

For an SDK generated from the OpenAPI spec: the spec's version, the first 12 hex digits of its SHA-256, and generator/version

### Parameters

| Name | Type | Description |
|---|---|---|
| `spec` | `System.String` |  |
| `specSha` | `System.String` |  |
| `generator` | `System.String` |  |

## `WithoutPlatform()` {#member-withoutplatform-e22939c4dff7}

````csharp sdk=dotnet sdk-namespace="BIM.works_SDK"
public ClientIdentity WithoutPlatform()
````

Without the runtime and the platform

## Inherited members

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