1.73.0 (latest) 1.69.0 1.68.0 1.60.0 1.59.0 1.55.0 1.50.0

    public interface IAuthorizationCodeInstalledApp

Authorization code flow for an installed application that persists end-user credentials.

## Namespace

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

## Assembly

Google.Apis.Auth.dll

## Properties

### CodeReceiver

    ICodeReceiver CodeReceiver { get; }

Gets the code receiver.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `ICodeReceiver` |   |

### Flow

    IAuthorizationCodeFlow Flow { get; }

Gets the authorization code flow.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `IAuthorizationCodeFlow` |   |

## Methods

### AuthorizeAsync(string, CancellationToken)

    Task<UserCredential> AuthorizeAsync(string userId, CancellationToken taskCancellationToken)

Asynchronously authorizes the installed application to access user's protected data.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `userId` | `string` User identifier |
| `taskCancellationToken` | `CancellationToken` Cancellation token to cancel an operation |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TaskUserCredential` | The user's credential |

## Extension Method

[Utilities.ThrowIfNull\<T\>(T, string)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Util.Utilities.md.txt#Google_Apis_Util_Utilities_ThrowIfNull__1___0_System_String_)