How do I mark mail as read using Gmail API?
I got the thread of email
Thread thread = service.users().threads().get(userId, message.getThreadId()).execute();
but it does not have method markRead like gmail API site says it should.
use either threads.modify() or messages.modify() (depending on scope of what you want to do) and removeLabelId of "UNREAD".
https://developers.google.com/gmail/api/v1/reference/users/threads/modify
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With