public sealed class OAuthToken : IMessage<OAuthToken>, IEquatable<OAuthToken>, IDeepCloneable<OAuthToken>, IBufferMessage, IMessage
Reference documentation and code samples for the Google Cloud Tasks v2beta3 API class OAuthToken.
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-09-04 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eOAuthToken\u003c/code\u003e class in the Google Cloud Tasks v2beta3 API provides the necessary information for generating OAuth tokens, primarily for Google APIs hosted on \u003ccode\u003e*.googleapis.com\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe class inherits from \u003ccode\u003eobject\u003c/code\u003e and implements \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e, offering functionalities such as deep cloning and buffer message handling.\u003c/p\u003e\n"],["\u003cp\u003eIt is associated with the \u003ccode\u003eGoogle.Cloud.Tasks.V2Beta3\u003c/code\u003e namespace and is contained within the \u003ccode\u003eGoogle.Cloud.Tasks.V2Beta3.dll\u003c/code\u003e assembly.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eOAuthToken\u003c/code\u003e class has two constructors, a default constructor and another taking an existing \u003ccode\u003eOAuthToken\u003c/code\u003e as a parameter for initialization.\u003c/p\u003e\n"],["\u003cp\u003eIt contains properties \u003ccode\u003eScope\u003c/code\u003e and \u003ccode\u003eServiceAccountEmail\u003c/code\u003e, allowing you to specify the OAuth scope and service account email, where the scope defaults to "\u003ca href=\"https://www.googleapis.com/auth/cloud-platform\"\u003ehttps://www.googleapis.com/auth/cloud-platform\u003c/a\u003e" if unspecified.\u003c/p\u003e\n"]]],[],null,["# Google Cloud Tasks v2beta3 API - Class OAuthToken (3.0.0-beta07)\n\nVersion latestkeyboard_arrow_down\n\n- [3.0.0-beta07 (latest)](/dotnet/docs/reference/Google.Cloud.Tasks.V2Beta3/latest/Google.Cloud.Tasks.V2Beta3.OAuthToken)\n- [3.0.0-beta06](/dotnet/docs/reference/Google.Cloud.Tasks.V2Beta3/3.0.0-beta06/Google.Cloud.Tasks.V2Beta3.OAuthToken)\n- [2.0.0-beta08](/dotnet/docs/reference/Google.Cloud.Tasks.V2Beta3/2.0.0-beta08/Google.Cloud.Tasks.V2Beta3.OAuthToken) \n\n public sealed class OAuthToken : IMessage\u003cOAuthToken\u003e, IEquatable\u003cOAuthToken\u003e, IDeepCloneable\u003cOAuthToken\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Google Cloud Tasks v2beta3 API class OAuthToken.\n\nContains information needed for generating an\n[OAuth token](https://developers.google.com/identity/protocols/OAuth2).\nThis type of authorization should generally only be used when calling Google\nAPIs hosted on \\*.googleapis.com. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e OAuthToken \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[OAuthToken](/dotnet/docs/reference/Google.Cloud.Tasks.V2Beta3/latest/Google.Cloud.Tasks.V2Beta3.OAuthToken), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[OAuthToken](/dotnet/docs/reference/Google.Cloud.Tasks.V2Beta3/latest/Google.Cloud.Tasks.V2Beta3.OAuthToken), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[OAuthToken](/dotnet/docs/reference/Google.Cloud.Tasks.V2Beta3/latest/Google.Cloud.Tasks.V2Beta3.OAuthToken), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html) \n\nInherited Members\n-----------------\n\n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\nNamespace\n---------\n\n[Google.Cloud.Tasks.V2Beta3](/dotnet/docs/reference/Google.Cloud.Tasks.V2Beta3/latest/Google.Cloud.Tasks.V2Beta3)\n\nAssembly\n--------\n\nGoogle.Cloud.Tasks.V2Beta3.dll\n\nConstructors\n------------\n\n### OAuthToken()\n\n public OAuthToken()\n\n### OAuthToken(OAuthToken)\n\n public OAuthToken(OAuthToken other)\n\nProperties\n----------\n\n### Scope\n\n public string Scope { get; set; }\n\nOAuth scope to be used for generating OAuth access token.\nIf not specified, \"\u003chttps://www.googleapis.com/auth/cloud-platform\u003e\"\nwill be used.\n\n### ServiceAccountEmail\n\n public string ServiceAccountEmail { get; set; }\n\n[Service account email](https://cloud.google.com/iam/docs/service-accounts)\nto be used for generating OAuth token.\nThe service account must be within the same project as the queue. The\ncaller must have iam.serviceAccounts.actAs permission for the service\naccount."]]