Table of Contents

Method FromApiKey

Namespace
MailFathom.AI.Providers
Assembly
MailFathom.AI.dll

FromApiKey(string, IDisposable?, IReadOnlyList<ProviderEndpointHeader>?, IReadOnlyList<IDisposable>?)

Builds a credential that presents a provider-issued key.

public static ProviderEndpointCredential FromApiKey(string apiKey, IDisposable? resolvedMaterial, IReadOnlyList<ProviderEndpointHeader>? extraHeaders = null, IReadOnlyList<IDisposable>? extraHeaderMaterial = null)

Parameters

apiKey string

The resolved key.

resolvedMaterial IDisposable

The secret material the key was read from, released when this credential is, or null when the caller holds none.

extraHeaders IReadOnlyList<ProviderEndpointHeader>

The resolved headers every request carries, or null where the endpoint declared none.

extraHeaderMaterial IReadOnlyList<IDisposable>

The secret material those headers were read from, released when this credential is.

Returns

ProviderEndpointCredential

The credential.

Exceptions

ArgumentException

Thrown when the key is blank.