Ramco Ramco

Ramco Ramco

  • 419
  • 3.4k
  • 528k

Error - cannot convert from Google.Apis.Util.Store.FileDataStore

Dec 15 2022 9:09 AM

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


Answers (1)