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 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\u003e\u003ccode\u003eOidcToken\u003c/code\u003e inherits from the base \u003ccode\u003eobject\u003c/code\u003e class, including methods like \u003ccode\u003eEquals\u003c/code\u003e, \u003ccode\u003eGetHashCode\u003c/code\u003e, and \u003ccode\u003eToString\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe primary functionality of the \u003ccode\u003eOidcToken\u003c/code\u003e class is provided through the \u003ccode\u003eGetAccessTokenAsync\u003c/code\u003e method, which retrieves the access token for requests and automatically refreshes it if expired.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eGetAccessTokenAsync\u003c/code\u003e method accepts a \u003ccode\u003eCancellationToken\u003c/code\u003e to allow cancellation of the asynchronous operation and returns a \u003ccode\u003eTask<string>\u003c/code\u003e containing the access token.\u003c/p\u003e\n"],["\u003cp\u003eThere 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.\u003c/p\u003e\n"]]],[],null,[]]