Reputation: 11
I try to find a way to submit a response to a Google Form that I do not have edit access to with Google Apps Script. Both of the FormApp.openById(id) and FormApp.openByUrl(url) methods need the user who is signed in to have edit access to the form, so I can't use those. The request has to come from my account because the Google Form keeps track of which account each response is from.
I know that it is possible to pre-fill a Google Form by adding values for specific fields on the end of the link. It is also possible to respond to a Google Form like that with just a POST request. However, I have only been able to make this work for Google Forms that don't need the user to be signed in.
To solve this problem, it would be great if there was a way to send a POST request from the Google account that is signed in.
Upvotes: 1
Views: 212
Reputation: 41
Currently, it is not possible to submit a Google Form without edit access. As you mentioned you can only make this work for Google Forms that don't need the user to be signed in (either by server-side POST or URL redirection on client-side).
Alternatively, client-side redirection will allow you to submit the Google form for the signed-in user, but it will show the google form's confirmation message.
Upvotes: 1