public Task<string> GetAccessTokenAsync(CancellationToken cancellationToken = default)
Gets the access token that should be included in headers when performing
requests with this OidcToken.
This method will refresh the access token if the current one has expired.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-03-21 UTC."],[[["The `OidcToken` class represents an OIDC Token within the `Google.Apis.Auth.OAuth2` namespace, found in the `Google.Apis.Auth.dll` assembly."],["`OidcToken` inherits from the base `object` class, including methods like `Equals`, `GetHashCode`, and `ToString`."],["The primary functionality of the `OidcToken` class is provided through the `GetAccessTokenAsync` method, which retrieves the access token for requests and automatically refreshes it if expired."],["The `GetAccessTokenAsync` method accepts a `CancellationToken` to allow cancellation of the asynchronous operation and returns a `Task\u003cstring\u003e` containing the access token."],["There are multiple versions of this class, ranging from 1.50.0 to the latest 1.69.0, with version 1.60.0 used in the provided examples."]]],[]]