In AppScript, I wrote this snippet of code to create a google form response, and get the edit link:
function createResponseTest() {
var test_form = FormApp.create('test-form').setAllowResponseEdits(true);
// Add a required item
test_form.addTextItem().setRequired(true);
// Create a blank response that hasn't completed the item
var FormResponse = test_form.createResponse();
const res = FormResponse.submit();
const link = res.getEditResponseUrl();
// Get a unique link to the response
console.log(link);
}
I have looked through the Google Forms documentation, but I don't see a method to create a google form response given a form ID, as is possible in Appscript (see docs here).
I want to run the line:
test_form.createResponse()
from my server, so I don't need to use AppScript at all, but I can't find how to do this.
Am I missing something, or is the Google Form API not feature-complete?
Edit:
I have requested this as a feature through the issue tracker. Track its progress here!