José C.
José C.

Reputation: 1

Google Forms API make form private

I need to create a Google Form programmatically and limit the emails/accounts that can access it.

Using the Web UI is possible to limit the access to accounts that belong to the same organisation (which is not perfect but is better than being public), but I'm unable to create a form using the API with that option enabled.

The Google Forms API documentation doesn't mention anything related with access restrictions. I know the form will be stored in Google Drive, but the permissions there seem to be correct.

Using the google APIS, is there a way to limit the access to a form to specific emails? Or if that is not possible, how do I restrict the access to only allow accounts from the same organisation?

Upvotes: 0

Views: 418

Answers (1)

Wicket
Wicket

Reputation: 38424

Use Forms Service from Google Apps Script, more specifically FormsApp.Form.setCollectEmail(true) and FormsApp.Form.setRequireLogin(true) as the Forms REST API isn't able isn't able to handle most of the Form settings, it only handle the quiz settings.


The Google Forms API doesn't cover all the Google Forms features, actually https://developers.google.com/forms used to explain what things could be done with the Google Apps Script Forms service and what could be done with the Google Forms REST API. I don't know why Google removed this content.

Unfortunatelly there are some settings that aren't available on none of them.


References

Upvotes: 0

Related Questions