2016-08-06 136 views

回答

0

listing messages,你可以給在q查詢參數的自定義搜索查詢。只需將值設置爲is:unread獲得未讀郵件,或!is:unread得到讀取消息:

請求

GET https://www.googleapis.com/gmail/v1/users/me/messages?q=is%3Aunread&access_token={YOUR_ACCESS_TOKEN} 

響應

{ 
"messages": [ 
    { 
    "id": "1565ad3af8dbd82e", 
    "threadId": "1565ad3af8dbd82e" 
    } 
], 
"resultSizeEstimate": 1 
}