I'm using the Google Gmail API in JavaScript and I want to retrieve a specific set of emails using the query parameter in the list request, the problem is that I cannot get the number of emails that satisfy the query like {from:test@test.com to:test@test.com}
, only inbox total or by tags/labels, which I do not want.
The request Users.messages: list returns this:
"nextPageToken": "1234567890123",
"resultSizeEstimate": 116
The number of emails in the current page.
Unless I loop over all the pages, I can't know the total number of emails satisfying the query.