# GitHubAppSettings

A GitHub App installation to sign in as instead of a user token. Its installation tokens have their own rate limit, separate from the user's.

Class 

`IntelligenceX.Telemetry.GitHub`

**Namespace**

`IntelligenceX.Telemetry.GitHub`

**Assembly**

`IntelligenceX`

**Source**

[GitHubAppCredentials.cs:22](https://github.com/EvotecIT/IntelligenceX/blob/master/IntelligenceX/Telemetry/GitHub/GitHubAppCredentials.cs#L22)

**Modifiers**

sealed

A GitHub App installation to sign in as instead of a user token. Its installation tokens have their own rate limit, separate from the user's. The private key stays in a local file named here; nothing in this record is a secret.

## Inheritance

- object
- GitHubAppSettings

## Usage

Explore 2 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

### Returned or exposed by 1

- Method [GitHubAppSettings.Load](/api/intelligencex-telemetry-github-githubappsettings/#method-load-string)

### Accepted by parameters 1

- Constructor [GitHubAppTokenSource.GitHubAppTokenSource](/api/intelligencex-telemetry-github-githubapptokensource/#constructor-ctor-intelligencex-telemetry-github-githubappsettings-net-http-httpclient-func-system-datetimeoffset) parameter `settings`

Filter members 

Show inherited

## Constructors

`public GitHubAppSettings(long appId, long installationId, string privateKeyPath, string? apiBaseUrl = null, bool enabled = true)` [#](#constructor-ctor-int64-int64-string-string-boolean)

[GitHubAppCredentials.cs:22](https://github.com/EvotecIT/IntelligenceX/blob/master/IntelligenceX/Telemetry/GitHub/GitHubAppCredentials.cs#L22)

Creates settings for one App installation.

Parameters

**appId long required**

**installationId long required**

**privateKeyPath string required**

**apiBaseUrl string? = null optional**

**enabled bool = true optional**

## Methods

`public static string DefaultPath()` [#](#method-defaultpath)

[GitHubAppCredentials.cs:50](https://github.com/EvotecIT/IntelligenceX/blob/master/IntelligenceX/Telemetry/GitHub/GitHubAppCredentials.cs#L50)

The settings file: INTELLIGENCEX_GITHUB_APP when set, otherwise github-app.json in the local IntelligenceX folder.

Returns

`string`

`public static GitHubAppSettings? Load(string? path = null)` [#](#method-load-string)

[GitHubAppCredentials.cs:58](https://github.com/EvotecIT/IntelligenceX/blob/master/IntelligenceX/Telemetry/GitHub/GitHubAppCredentials.cs#L58)

Reads the settings, or null when the file is missing, disabled or incomplete, so the user token stays in use.

Parameters

**path string? = null optional**

Returns

`GitHubAppSettings?`

## Inherited Methods

`public virtual bool Equals(object? obj)` [#](#method-equals-object)

Inherited from object

Parameters

**obj object? required**

Returns

`bool`

`public virtual int GetHashCode()` [#](#method-gethashcode)

Inherited from object

Returns

`int`

`public Type GetType()` [#](#method-gettype)

Inherited from object

Returns

`Type`

`public virtual string? ToString()` [#](#method-tostring)

Inherited from object

Returns

`string?`

## Properties

`public long AppId { get; }` [#](#property-appid)

[GitHubAppCredentials.cs:31](https://github.com/EvotecIT/IntelligenceX/blob/master/IntelligenceX/Telemetry/GitHub/GitHubAppCredentials.cs#L31)

The App's numeric ID.

`public long InstallationId { get; }` [#](#property-installationid)

[GitHubAppCredentials.cs:34](https://github.com/EvotecIT/IntelligenceX/blob/master/IntelligenceX/Telemetry/GitHub/GitHubAppCredentials.cs#L34)

The installation's numeric ID on the account or organisation.

`public string PrivateKeyPath { get; }` [#](#property-privatekeypath)

[GitHubAppCredentials.cs:37](https://github.com/EvotecIT/IntelligenceX/blob/master/IntelligenceX/Telemetry/GitHub/GitHubAppCredentials.cs#L37)

Path to the App's private key (PEM).

`public string ApiBaseUrl { get; }` [#](#property-apibaseurl)

[GitHubAppCredentials.cs:40](https://github.com/EvotecIT/IntelligenceX/blob/master/IntelligenceX/Telemetry/GitHub/GitHubAppCredentials.cs#L40)

The REST API root; GitHub.com unless set.

`public bool Enabled { get; }` [#](#property-enabled)

[GitHubAppCredentials.cs:43](https://github.com/EvotecIT/IntelligenceX/blob/master/IntelligenceX/Telemetry/GitHub/GitHubAppCredentials.cs#L43)

False keeps the file but signs in with the user token again.

<!-- PowerForge markdown artifact sha256:DEC07E80411D4EE8ACDD7DD5B6ADAE981868B4ABC9402CF25818D38E66BEA41C -->
