Gmail API返回带有“SENT”标签的聊天记录

时间:2016-01-22 15:14:13

标签: php gmail gmail-api

使用Gmail API调用

  

https://www.googleapis.com/gmail/v1/users/userId/messages/id

使用标签 SENT

返回聊天

我使用以下代码获取消息内容

$url = "https://www.googleapis.com/gmail/v1/users/$useremail/messages/$messageid?format=full";
$response = $gmailInstance->performHttpRequest($gmailAuthObj, $useremail, $url);
$responseBody = json_decode($response->getResponseBody(), TRUE);

我对上述API调用获得了以下响应

{
 "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
 }

有人知道为什么API响应会返回带有SENT标签的聊天消息吗?有没有办法避免这种情况(聊天响应中的SENT标签)?

0 个答案:

没有答案