title: Gmail API return chats with "SENT" label
body: <p>Using the Gmail API call </p>
  
  <blockquote>
    <p><a href="https://www.googleapis.com/gmail/v1/users/userId/messages/id" rel="nofollow">https://www.googleapis.com/gmail/v1/users/userId/messages/id</a></p>
  </blockquote>
  
  <p>return <strong>chats</strong> with label <strong>SENT</strong></p>
  
  <p>I have used the following code for getting the message content</p>
  
  <pre><code>$url = "https://www.googleapis.com/gmail/v1/users/$useremail/messages/$messageid?format=full";
  $response = $gmailInstance-&gt;performHttpRequest($gmailAuthObj, $useremail, $url);
  $responseBody = json_decode($response-&gt;getResponseBody(), TRUE);
  </code></pre>
  
  <p>I got the following response for the above API call</p>
  
  <pre><code>{
   "id": msgid,
   "threadId": threadid,
   "labelIds": [
       "CHAT",
       "SENT"
   ],
   "snippet": "sometext",
   "historyId": 7 digit numeric,
   "internalDate": "1371160444361",
   "payload": {
       "partId": "",
       "mimeType": "text/html",
       "filename": "",
       "headers": [{
           "name": "From",
           "value": "Test User \u003ctuser@tdom.com\u003e"
        }],
        "body": {
            "size": 20,
            "data": somerandomstring
        }
   },
   "sizeEstimate": 100
   }
  </code></pre>
  
  <p>Does anybody know why the API response return chat message with SENT label in it? Is there a way to avoid this (SENT label from chat response)?</p>