Hi
I am getting below error - Severity Code Description Project File Line Suppression State
Error CS1503 Argument 4: cannot convert from 'Google.Apis.Util.Store.FileDataStore' to 'System.Threading.CancellationToken'
UserCredential credential;
using (var stream = new FileStream("client_secrets.json", FileMode.Open, FileAccess.Read))
{
credential = GoogleWebAuthorizationBroker.AuthorizeAsync(
GoogleClientSecrets.Load(stream).Secrets,
new[] { YouTubeService.Scope.YoutubeReadonly },
"user",
//CancellationToken.None,
new FileDataStore(this.GetType().ToString())
);
}
Thanks
Muthu vjPosted Dec 21, 2022, 10:16 AM
Hi RamCo,
You are passing the DataStore Value in Wrong Place, it should come and bind it to the next Property.Pass the Cancellation Token if you have
try this,
using (var stream = new FileStream("client_secrets.json", FileMode.Open, FileAccess.Read)) { credential = GoogleWebAuthorizationBroker.AuthorizeAsync( GoogleClientSecrets.Load(stream).Secrets, new[] { YouTubeService.Scope.YoutubeReadonly }, "user", CancellationToken.None, new FileDataStore(this.GetType().ToString()) ); }