1.73.0 (latest) 1.69.0 1.68.0 1.60.0 1.59.0 1.55.0 1.50.0

    [Obsolete("https://developers.google.com/identity/protocols/oauth2/index.html#4.-send-the-access-token-to-an-api.")]
    public class BearerToken.QueryParameterAccessMethod : IAccessMethod

Obsolete.
Thread-safe OAuth 2.0 method for accessing protected resources using an `access_token` query parameter
as specified in <http://tools.ietf.org/html/rfc6750#section-2.3>.
This access method is being made obsolete. Please read here for more up to date information:
`https://developers.google.com/identity/protocols/oauth2/index.html#4.-send-the-access-token-to-an-api.`.
Please use [BearerToken.AuthorizationHeaderAccessMethod](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.BearerToken.AuthorizationHeaderAccessMethod.md.txt) instead.

## Inheritance

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

## Implements

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

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

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

## Methods

### GetAccessToken(HttpRequestMessage)

    public string GetAccessToken(HttpRequestMessage request)

Retrieves the original access token in the HTTP request, as provided in the [Intercept(HttpRequestMessage, string)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.IAccessMethod.md.txt#Google_Apis_Auth_OAuth2_IAccessMethod_Intercept_System_Net_Http_HttpRequestMessage_System_String_)
method.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `HttpRequestMessage` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### Intercept(HttpRequestMessage, string)

    public void Intercept(HttpRequestMessage request, string accessToken)

Intercepts a HTTP request right before the HTTP request executes by providing the access token.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `HttpRequestMessage` |
| `accessToken` | `string` |

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