Fred
Fred

Reputation: 655

Gmail API: Is there a way to get RFC822 message id's when doing messages.list with a query?

From what I can tell there's no documented way to get RFC822 message id's when listing messages with a query. It would be beneficial for us in avoiding fetching multiple times the same email from different inboxes... Any insights?

Upvotes: 1

Views: 545

Answers (1)

Tholle
Tholle

Reputation: 112867

You can only get the messageId and threadId of messages when listing them, and a resultSizeEstimate of the entire query.

You have to list the messages and then get them in order to read the Message-ID-header.

Instead of listing X messages and doing X separate GET-requests for the messages, you can use batch requests to only make 2 requests in total for each page.

Upvotes: 1

Related Questions