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"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eOidcToken\u003c/code\u003e class represents an OpenID Connect (OIDC) token within the \u003ccode\u003eGoogle.Apis.Auth.OAuth2\u003c/code\u003e namespace, found in the \u003ccode\u003eGoogle.Apis.Auth.dll\u003c/code\u003e assembly.\u003c/p\u003e\n"],["\u003cp\u003eIt inherits from the \u003ccode\u003eobject\u003c/code\u003e class and provides access to inherited members like \u003ccode\u003eEquals\u003c/code\u003e, \u003ccode\u003eGetHashCode\u003c/code\u003e, \u003ccode\u003eGetType\u003c/code\u003e, \u003ccode\u003eReferenceEquals\u003c/code\u003e, and \u003ccode\u003eToString\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eGetAccessTokenAsync\u003c/code\u003e method retrieves a valid access token, refreshing it if it's expired, and it takes an optional \u003ccode\u003eCancellationToken\u003c/code\u003e for operation cancellation.\u003c/p\u003e\n"],["\u003cp\u003eThe access token obtained from the \u003ccode\u003eGetAccessTokenAsync\u003c/code\u003e method is intended to be used in request headers when interacting with this specific \u003ccode\u003eOidcToken\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eAvailable versions for the OidcToken class are 1.69.0, 1.68.0, 1.60.0, 1.59.0, 1.55.0 and 1.50.0 with 1.69.0 being the latest version.\u003c/p\u003e\n"]]],[],null,[]]