## GetInstance(string, string) {#getinstance_1}

Gets instance of Gmail client

```csharp
public static IGmailClient GetInstance(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 [IGmailClient](../../igmailclient/)
* class [GmailClient](../)
* namespace [Aspose.Email.Clients.Google](../../gmailclient/)
* assembly [Aspose.Email](../../../)

---

## GetInstance(string, IWebProxy, string) {#getinstance}

Gets instance of Gmail client

```csharp
public static IGmailClient GetInstance(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 [IGmailClient](../../igmailclient/)
* class [GmailClient](../)
* namespace [Aspose.Email.Clients.Google](../../gmailclient/)
* assembly [Aspose.Email](../../../)

---

## GetInstance(string, string, string, string) {#getinstance_3}

Gets instance of Gmail client

```csharp
public static IGmailClient GetInstance(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 [IGmailClient](../../igmailclient/)
* class [GmailClient](../)
* namespace [Aspose.Email.Clients.Google](../../gmailclient/)
* assembly [Aspose.Email](../../../)

---

## GetInstance(string, string, string, IWebProxy, string) {#getinstance_2}

Gets instance of Gmail client

```csharp
public static IGmailClient GetInstance(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 [IGmailClient](../../igmailclient/)
* class [GmailClient](../)
* namespace [Aspose.Email.Clients.Google](../../gmailclient/)
* assembly [Aspose.Email](../../../)


