# Class TokenRequest (1.73.0)

<button class="button button-with-icon cloud-select-dropdown__button " aria-haspopup="true">Version latest</button>

- [1.73.0 (latest)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.Requests.TokenRequest)
- [1.69.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/1.69.0/Google.Apis.Auth.OAuth2.Requests.TokenRequest)
- [1.68.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/1.68.0/Google.Apis.Auth.OAuth2.Requests.TokenRequest)
- [1.60.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/1.60.0/Google.Apis.Auth.OAuth2.Requests.TokenRequest)
- [1.59.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/1.59.0/Google.Apis.Auth.OAuth2.Requests.TokenRequest)
- [1.55.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/1.55.0/Google.Apis.Auth.OAuth2.Requests.TokenRequest)
- [1.50.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/1.50.0/Google.Apis.Auth.OAuth2.Requests.TokenRequest)

    public class TokenRequest

OAuth 2.0 request for an access token as specified in <http://tools.ietf.org/html/rfc6749#section-4>.

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> TokenRequest

## Inherited Members

[object.Equals(object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)) [object.Equals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)) [object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone) [object.ReferenceEquals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.referenceequals) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Derived Types

[AuthorizationCodeTokenRequest](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.Requests.AuthorizationCodeTokenRequest) [GoogleAssertionTokenRequest](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.Requests.GoogleAssertionTokenRequest) [RefreshTokenRequest](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.Requests.RefreshTokenRequest)

## Namespace

[Google.Apis.Auth.OAuth2.Requests](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.Requests)

## Assembly

Google.Apis.Auth.dll

## Properties

### ClientId

    [RequestParameter("client_id")]
    public string ClientId { get; set; }

Gets or sets the client Identifier.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### ClientSecret

    [RequestParameter("client_secret")]
    public string ClientSecret { get; set; }

Gets or sets the client Secret.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### GrantType

    [RequestParameter("grant_type")]
    public string GrantType { get; set; }

Gets or sets the Grant type. Sets `authorization_code` or `password` or `client_credentials`
or `refresh_token` or absolute URI of the extension grant type.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### Scope

    [RequestParameter("scope")]
    public string Scope { get; set; }

Gets or sets space-separated list of scopes as specified in <http://tools.ietf.org/html/rfc6749#section-3.3>.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

## Extension Methods

[TokenRequestExtenstions.ExecuteAsync(TokenRequest, HttpClient, string, CancellationToken, IClock)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.Requests.TokenRequestExtenstions#Google_Apis_Auth_OAuth2_Requests_TokenRequestExtenstions_ExecuteAsync_Google_Apis_Auth_OAuth2_Requests_TokenRequest_System_Net_Http_HttpClient_System_String_System_Threading_CancellationToken_Google_Apis_Util_IClock_) [Utilities.ThrowIfNull\<T\>(T, string)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Util.Utilities#Google_Apis_Util_Utilities_ThrowIfNull__1___0_System_String_)