title: Gmail API Import - Error 413 Request Entity Too Large
body: <p>I am using Google API PHP Client. I am writing a program which imports bulk messages from one account to another account. To import, I am using the line:</p>
  
  <pre><code>$service-&gt;users_messages-&gt;import('me', $message, $options);
  </code></pre>
  
  <p>..where $message is the raw message which comes from <code>$service-&gt;users_messages-&gt;get()</code>.</p>
  
  <p>First, the program gets the list of messages from one account. User selects the messages he wants to import then clicks the Import button. The importing loops the selected messages and works fine, but there are some messages which contain large attachments. These messages will fail and return the <strong>Error 413 - Request entity too large.</strong></p>
  
  <p>I have read that I need to indicate that the upload type should be multipart.
  I am using Google API PHP Client and I don't see any methods, classes or options to add this upload type.</p>
  
  <p>Any suggestions will be helpful. Thanks.</p>