Is it still possible to programmatically send "responces" to Google Forms. Preferably without users logging in. I think they changed the protocol.
In a unity application, I need to setup a survey, and the obvious choice was google forms, since a friend of mine did in the past. However, after implementing some test code from a tutorial, I can't get responses through and not receiving any data despite following a tutorial. Instead it complains about 401 unauthorized error. Heres some code :
private string target_url =
"https://docs.google.com/forms/myForm/formResponse";
private IEnumerator RoutineSendActual()
{
WWWForm form = new WWWForm();
form.AddField( "entry.689820410", "code test" );
var www = new WWW( target_url, form.data );
Debug.Log( www.url );
yield return www;
Debug.Log( "sent " + www.error + " " + www.isDone + " " + www.responseHeaders);
foreach ( var responseKey in www.responseHeaders.Keys )
{
Debug.Log( responseKey + "|" + www.responseHeaders[responseKey] );
}
Debug.Log( www.text );
yield break;
}
Instead www.error is giving me 401 unauthorized error. I've followed the following tutorial https://www.youtube.com/watch?v=z9b5aRfrz7M and the following questions has it working How to add value on another section in google form in Unity3d
but for me, I get 401 unauthorized. I even made sure the Forms and spreadsheet where made public and editable to everyone (which i'm worried about because could hack the data).
Also, should I instead be looking into Google Apps Script to act as an intermediary between unity web request and the actual form.