Modify Google Form from C# with security?

43 views Asked by At

I'm trying to modify a question on a google form from C# I have a service account registered that has authentication token for e.g. access to Google Drive API, and I've given the service access to the Forms api also.

From C# there isn't currently a nuget package from Google for Forms, but I have found the GoogleFormsToolkitLibrary which appears to be wrapper around the Google Forms REST service, however the toolkit doesn't allow for any security settings, so it only works with publicly available forms.

I know that to access the Drive service I have to create the service as follows

var credential = GoogleCredential.FromFile(serviceAccountKeyPath)
    .CreateScoped(DriveService.Scope.DriveFile);

return new DriveService(new BaseClientService.Initializer()
{
    HttpClientInitializer = credential,
    ApplicationName = "MyGoogleServiceApplication",
});

Does anyone know if it's possible to do something similar for the RESTful Google Forms API?

0

There are 0 answers