title: Posting data to new Google Forms
body: <p>With the previous(legacy) version of google forms it was possible to  programatically post data to the form by sending an HttpPost to a url like this:</p>
  
  <pre><code>https://spreadsheets.google.com/formResponse?formkey=[key]
  </code></pre>
  
  <p>and data like this:</p>
  
  <pre><code>entry.1.single=data&amp;entry.2.single=moredata
  </code></pre>
  
  <p>With the new version of google forms (released jan 2013 I think) the url structure is different. Here is a snippet from the "view live form page"</p>
  
  <pre><code>&lt;form action="https://docs.google.com/forms/d/1Ee330GpkMHX_0dKWmJb6ZPdm4FBhhqJSqBbgysEtq6M/formResponse" method="POST" ...
  &lt;input type="text" name="entry.1566150510"
  </code></pre>
  
  <p>From this code snippet I would think that I could post to a url like this:</p>
  
  <pre><code>https://docs.google.com/forms/d/[key]/formResponse
  </code></pre>
  
  <p>with data like this:</p>
  
  <pre><code>entry.1566150510=data
  </code></pre>
  
  <p>But I've tried that from java(android) like this:</p>
  
  <pre><code>public void postData() {
      // Create a new HttpClient and Post Header
      HttpClient httpclient = new DefaultHttpClient();
      Log.i(myTag, "Inside postData()");
      String fullUrl = "https://docs.google.com/forms/d/1Ee330GpkMHX_0dKWmJb6ZPdm4FBhhqJSqBbgysEtq6M/formResponse";
      Log.i(myTag, "url = " + fullUrl);
      HttpPost httppost = new HttpPost(urlBase);
  
      try {
          // Add your data
          List&lt;NameValuePair&gt; nameValuePairs = new ArrayList&lt;NameValuePair&gt;(2);
          nameValuePairs.add(new BasicNameValuePair("entry.1566150510", "somedata"));
          UrlEncodedFormEntity data = new UrlEncodedFormEntity(nameValuePairs);
          Log.i(myTag, data.toString());
          httppost.setEntity(data);
          Log.i(myTag, EntityUtils.toString(data));
          // Execute HTTP Post Request
          ResponseHandler&lt;String&gt; responseHandler=new BasicResponseHandler();
          String response = httpclient.execute(httppost, responseHandler);
          Log.i("DocsUploader", "response = " + response);
  
      } catch (ClientProtocolException e) {
          // TODO Auto-generated catch block
          e.printStackTrace();
      } catch (IOException e) {
          // TODO Auto-generated catch block
          e.printStackTrace();
      }
  } 
  </code></pre>
  
  <p>and I get 404, not found response. </p>
  
  <p>Am I missing something obvious here, or has google just removed the ability to post to the new forms?</p>