At least one client secrets (Installed or Web) should be set c# code example

Example: At least one client secrets (Installed or Web) should be set c#

string[] scopes = new string[] {driveservice.scope.drive}; // full access var keyfilepath = @"c:\file.p12" ;    // downloaded https://console.developers.google.com  var serviceaccountemail = "[email protected]";  // found https://console.developers.google.com    //loading key file  var certificate = new x509certificate2(keyfilepath, "notasecret", x509keystorageflags.exportable);  var credential = new serviceaccountcredential( new serviceaccountcredential.initializer(serviceaccountemail) {  scopes = scopes}.fromcertificate(certificate));