title: Gmail API all messages
body: <p>I need to get all messages in Inbox with gmail api. But I see only one way to do it. </p>
  
  <ol>
  <li><p>Get list of messages(<em>id, threadID</em>)</p>
  
  <pre><code>GET https://www.googleapis.com/gmail/v1/users/somebody%40gmail.com/messages?labelIds=INBOX&amp;key={YOUR_API_KEY}
  </code></pre></li>
  <li><p>With id`s get all messages in loop</p>
  
  <pre><code>While 
      GET https://www.googleapis.com/gmail/v1/users/somebody%40gmail.com/messages/147199d21bbaf5a5?key={YOUR_API_KEY}
  End of While
  </code></pre></li>
  </ol>
  
  <p>But for this way needed 100500 request. 
  Have anybody idea how to get with one request all messages(or just <em>payload</em> field)?</p>