# Class GoogleAuthorizationCodeRequestUrl (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.GoogleAuthorizationCodeRequestUrl)
- [1.69.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/1.69.0/Google.Apis.Auth.OAuth2.Requests.GoogleAuthorizationCodeRequestUrl)
- [1.68.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/1.68.0/Google.Apis.Auth.OAuth2.Requests.GoogleAuthorizationCodeRequestUrl)
- [1.60.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/1.60.0/Google.Apis.Auth.OAuth2.Requests.GoogleAuthorizationCodeRequestUrl)
- [1.59.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/1.59.0/Google.Apis.Auth.OAuth2.Requests.GoogleAuthorizationCodeRequestUrl)
- [1.55.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/1.55.0/Google.Apis.Auth.OAuth2.Requests.GoogleAuthorizationCodeRequestUrl)
- [1.50.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/1.50.0/Google.Apis.Auth.OAuth2.Requests.GoogleAuthorizationCodeRequestUrl)

    public class GoogleAuthorizationCodeRequestUrl : AuthorizationCodeRequestUrl

Google-specific implementation of the OAuth 2.0 URL for an authorization web page to allow the end user to
authorize the application to access their protected resources and that returns an authorization code, as
specified in <https://developers.google.com/accounts/docs/OAuth2WebServer>.

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> [AuthorizationRequestUrl](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.Requests.AuthorizationRequestUrl) \> [AuthorizationCodeRequestUrl](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.Requests.AuthorizationCodeRequestUrl) \> GoogleAuthorizationCodeRequestUrl

## Inherited Members

[AuthorizationCodeRequestUrl.Build()](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.Requests.AuthorizationCodeRequestUrl#Google_Apis_Auth_OAuth2_Requests_AuthorizationCodeRequestUrl_Build) [AuthorizationRequestUrl.ResponseType](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.Requests.AuthorizationRequestUrl#Google_Apis_Auth_OAuth2_Requests_AuthorizationRequestUrl_ResponseType) [AuthorizationRequestUrl.ClientId](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.Requests.AuthorizationRequestUrl#Google_Apis_Auth_OAuth2_Requests_AuthorizationRequestUrl_ClientId) [AuthorizationRequestUrl.RedirectUri](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.Requests.AuthorizationRequestUrl#Google_Apis_Auth_OAuth2_Requests_AuthorizationRequestUrl_RedirectUri) [AuthorizationRequestUrl.Scope](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.Requests.AuthorizationRequestUrl#Google_Apis_Auth_OAuth2_Requests_AuthorizationRequestUrl_Scope) [AuthorizationRequestUrl.State](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.Requests.AuthorizationRequestUrl#Google_Apis_Auth_OAuth2_Requests_AuthorizationRequestUrl_State) [AuthorizationRequestUrl.AuthorizationServerUrl](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.Requests.AuthorizationRequestUrl#Google_Apis_Auth_OAuth2_Requests_AuthorizationRequestUrl_AuthorizationServerUrl) [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)

## 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

## Constructors

### GoogleAuthorizationCodeRequestUrl(Uri)

    public GoogleAuthorizationCodeRequestUrl(Uri authorizationServerUrl)

Constructs a new authorization code request with the given authorization server URL. This constructor sets
the [AccessType](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.Requests.GoogleAuthorizationCodeRequestUrl#Google_Apis_Auth_OAuth2_Requests_GoogleAuthorizationCodeRequestUrl_AccessType) to `offline`.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `authorizationServerUrl` | `https://learn.microsoft.com/dotnet/api/system.uri` |

## Properties

### AccessType

    [RequestParameter("access_type", RequestParameterType.Query)]
    public string AccessType { get; set; }

Gets or sets the access type. Set `online` to request on-line access or `offline` to request
off-line access or `null` for the default behavior. The default value is `offline`.

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

### ApprovalPrompt

    [RequestParameter("approval_prompt", RequestParameterType.Query)]
    [Obsolete("Unused for Google OpenID; use the 'Prompt' property instead.")]
    public string ApprovalPrompt { get; set; }

Gets or sets prompt for consent behavior `auto` to request auto-approval or`force` to force the
approval UI to show, or `null` for the default behavior.

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

### CodeChallenge

    [RequestParameter("code_challenge", RequestParameterType.Query)]
    public string CodeChallenge { get; set; }

Gets or sets the code challenge.
See <https://developers.google.com/identity/protocols/oauth2/native-app#create-the-code-challenge>
for more information.

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

### CodeChallengeMethod

    [RequestParameter("code_challenge_method", RequestParameterType.Query)]
    public string CodeChallengeMethod { get; set; }

Gets or sets the code challenge method.
See <https://developers.google.com/identity/protocols/oauth2/native-app#create-the-code-challenge>
for more information.

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

### IncludeGrantedScopes

    [RequestParameter("include_granted_scopes", RequestParameterType.Query)]
    public string IncludeGrantedScopes { get; set; }

Gets or sets the include granted scopes to determine if this authorization request should use
incremental authorization (<https://developers.google.com/+/web/api/rest/oauth#incremental-auth>).
If true and the authorization request is granted, the authorization will include any previous
authorizations granted to this user/application combination for other scopes.

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

**Remarks** Currently unsupported for installed apps.

### LoginHint

    [RequestParameter("login_hint", RequestParameterType.Query)]
    public string LoginHint { get; set; }

Gets or sets the login hint. Sets `email address` or sub `identifier`.
When your application knows which user it is trying to authenticate, it may provide this parameter as a
hint to the Authentication Server. Passing this hint will either pre-fill the email box on the sign-in form
or select the proper multi-login session, thereby simplifying the login flow.

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

### Nonce

    [RequestParameter("nonce", RequestParameterType.Query)]
    public string Nonce { get; set; }

Gets or sets the nonce;
a random value generated by your app that enables replay protection.
See <https://developers.google.com/identity/protocols/OpenIDConnect> for more details.

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

### Prompt

    [RequestParameter("prompt", RequestParameterType.Query)]
    public string Prompt { get; set; }

Gets of sets prompt for consent behaviour.
Value can be `null`, `"none"`, `"consent"`, or `"select_account"`.
See [OpenIDConnect documentation](https://developers.google.com/identity/protocols/OpenIDConnect#prompt)
for details.

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

### UserDefinedQueryParams

    [RequestParameter("user_defined_query_params", RequestParameterType.UserDefinedQueries)]
    public IEnumerable<KeyValuePair<string, string>> UserDefinedQueryParams { get; set; }

Gets or sets a collection of user defined query parameters to facilitate any not explicitly supported
by the library which will be included in the resultant authentication URL.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| ``https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1System.Collections.Generic.KeyValuePair`2https://learn.microsoft.com/dotnet/api/system.stringhttps://learn.microsoft.com/dotnet/api/system.string`` |   |

**Remarks** The name of this parameter is used only for the constructor and will not end up in the resultant query
string.

## Extension Method

[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_)