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

# OAuthGrant

> A token endpoint's answer.

A token endpoint's answer. `RefreshToken` is set when the vendor rotates it.

```csharp
public sealed record OAuthGrant : IEquatable<OAuthGrant>
```

**Implements:** `IEquatable<OAuthGrant>`

## Constructors

```csharp
public OAuthGrant(string AccessToken, string? RefreshToken, int? ExpiresIn = null)
```

A token endpoint's answer. `RefreshToken` is set when the vendor rotates it.

### Parameters

**AccessToken** `string` *required*

**RefreshToken** `string` *required*

**ExpiresIn** `int?`

## Properties

**AccessToken** `string` *required*

**Answer** `JsonObject` *required*

The whole answer.

**ExpiresIn** `int?`

**RefreshToken** `string`

## Methods

### Deconstruct()

```csharp
public void Deconstruct(out string AccessToken, out string? RefreshToken, out int? ExpiresIn)
```

#### Parameters

**AccessToken** `string` *required*

**RefreshToken** `string` *required*

**ExpiresIn** `int?` *required*

### Equals()

```csharp
public bool Equals(OAuthGrant? other)
```

#### Parameters

**other** `OAuthGrant` *required*

#### Returns

`bool`

```csharp
public override bool Equals(object? obj)
```

#### Parameters

**obj** `object` *required*

#### Returns

`bool`

### GetHashCode()

```csharp
public override int GetHashCode()
```

#### Returns

`int`

### operator !=()

```csharp
public static bool operator !=(OAuthGrant? left, OAuthGrant? right)
```

#### Parameters

**left** `OAuthGrant` *required*

**right** `OAuthGrant` *required*

#### Returns

`bool`

### operator ==()

```csharp
public static bool operator ==(OAuthGrant? left, OAuthGrant? right)
```

#### Parameters

**left** `OAuthGrant` *required*

**right** `OAuthGrant` *required*

#### Returns

`bool`

### ToString()

```csharp
public override string ToString()
```

#### Returns

`string`


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.