IAsyncTokenProviderGetAccessTokenAsync Method

Gets oAuth access token.

Namespace:  Aspose.Email.Clients
Assembly:  Aspose.Email (in Aspose.Email.dll) Version: 21.12
Task<OAuthToken> GetAccessTokenAsync(
	bool ignoreExistingToken = false,
	CancellationToken cancellationToken = default


ignoreExistingToken (Optional)
Type: SystemBoolean
If ignoreExistingToken is true, requests new token from a server. Otherwise behaviour is depended on whether token exists or not. If token exists and its expiration date is not expired returns current token, otherwise requests new token from a server.
cancellationToken (Optional)
Type: System.ThreadingCancellationToken
The cancellation token

Return Value

Type: TaskOAuthToken
Returns oAuth access token
See Also