## GetInstanceAsync(string, string) {#getinstanceasync_1}

Gets instance of Gmail client for asynchronous operation.

```csharp
public static IGmailClientAsync GetInstanceAsync(string accessToken, string defaultEmail)
```

| Parameter | Type | Description |
| --- | --- | --- |
| accessToken | String | OAuth 2.0 access token |
| defaultEmail | String | Default email address |

### Return Value

Returns instance of Gmail client

### See Also

* interface [IGmailClientAsync](../../igmailclientasync/)
* class [GmailClient](../)
* namespace [Aspose.Email.Clients.Google](../../gmailclient/)
* assembly [Aspose.Email](../../../)

---

## GetInstanceAsync(string, IWebProxy, string) {#getinstanceasync}

Gets instance of Gmail client for asynchronous operation.

```csharp
public static IGmailClientAsync GetInstanceAsync(string accessToken, IWebProxy proxy, 
    string defaultEmail)
```

| Parameter | Type | Description |
| --- | --- | --- |
| accessToken | String | OAuth 2.0 access token |
| proxy | IWebProxy | IWebProxy for Gmail client |
| defaultEmail | String | Default email address |

### Return Value

Returns instance of Gmail client

### See Also

* interface [IGmailClientAsync](../../igmailclientasync/)
* class [GmailClient](../)
* namespace [Aspose.Email.Clients.Google](../../gmailclient/)
* assembly [Aspose.Email](../../../)

---

## GetInstanceAsync(string, string, string, string) {#getinstanceasync_3}

Gets instance of Gmail client for asynchronous operation.

```csharp
public static IGmailClientAsync GetInstanceAsync(string clientId, string clientSecret, 
    string refreshToken, string defaultEmail)
```

| Parameter | Type | Description |
| --- | --- | --- |
| clientId | String | The client ID obtained from the Google Cloud Console during application registration. |
| clientSecret | String | The client secret obtained during application registration. |
| refreshToken | String | OAuth 2.0 refresh token |
| defaultEmail | String | Default email address |

### Return Value

Returns instance of Gmail client

### See Also

* interface [IGmailClientAsync](../../igmailclientasync/)
* class [GmailClient](../)
* namespace [Aspose.Email.Clients.Google](../../gmailclient/)
* assembly [Aspose.Email](../../../)

---

## GetInstanceAsync(string, string, string, IWebProxy, string) {#getinstanceasync_2}

Gets instance of Gmail client for asynchronous operation.

```csharp
public static IGmailClientAsync GetInstanceAsync(string clientId, string clientSecret, 
    string refreshToken, IWebProxy proxy, string defaultEmail)
```

| Parameter | Type | Description |
| --- | --- | --- |
| clientId | String | The client ID obtained from the Google Cloud Console during application registration. |
| clientSecret | String | The client secret obtained during application registration. |
| refreshToken | String | OAuth 2.0 refresh token |
| proxy | IWebProxy | IWebProxy for Gmail client |
| defaultEmail | String | Default email address |

### Return Value

Returns instance of Gmail client

### See Also

* interface [IGmailClientAsync](../../igmailclientasync/)
* class [GmailClient](../)
* namespace [Aspose.Email.Clients.Google](../../gmailclient/)
* assembly [Aspose.Email](../../../)


