GMail API - messages().list() only returns message IDs

Viewed 1003

The list() method only returns a list of message IDs without any other message metadata. There are SO posts from 2014 and 2016, but the official documentation states that the response is a list of user.messages resource ...

Is the documentation wrong or is there any other way to do this? I understand that bringing the entire message in a "list" call is not efficient for a REST API call - but maybe returning "some" metadata would make sense (e.g. output of service.users().messages().get(..., format='metadata')) as opposed to making a call to list() and then, for every message, make a get(..., format='metadata')

Thanks!

M

1 Answers
gmail.users.messages.get({
auth: auth,
userId: 'me',
id: messageid,
format: "raw"
}, function (err, response) { 
});

You have to call the above api with each messageid. The response will be raw data for corresponding email

Related