public sealed class OAuthToken : IMessage<OAuthToken>, IEquatable<OAuthToken>, IDeepCloneable<OAuthToken>, IBufferMessage, IMessage
Contains information needed for generating an
OAuth token.
This type of authorization should generally only be used when calling Google
APIs hosted on *.googleapis.com.
Service account email
to be used for generating OAuth token.
The service account must be within the same project as the queue. The
caller must have iam.serviceAccounts.actAs permission for the service
account.
[[["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-04-09 UTC."],[[["The `OAuthToken` class in the `Google.Cloud.Tasks.V2` namespace is used to generate OAuth tokens, primarily for calls to Google APIs hosted on *.googleapis.com."],["This class has several versions available, ranging from 2.2.0 to 3.5.0, with version 3.5.0 being the latest, and the content of this page focusing on version 2.4.0."],["`OAuthToken` inherits from `Object` and implements interfaces such as `IMessage`, `IEquatable`, `IDeepCloneable`, and `IBufferMessage`."],["The `OAuthToken` class provides properties for `Scope`, which determines the OAuth scope (defaulting to \"https://www.googleapis.com/auth/cloud-platform\"), and `ServiceAccountEmail`, which is the service account email used to generate the token."],["There are two constructors available, one default, and one that accepts another OAuthToken."]]],[]]