Search code examples
c#.netgoogle-apigmailgoogle-api-dotnet-client

GMAIL API Page token informations


I'm creating an prgram that need to request a large amount of email. But I'm wondering what is the next page token if there is no more mails available ?


Solution

  • This is similar to GMail API pagination use of nextPageToken, but it's really only covered by that question and not entirely the same.

    Anyway, there won't be a nextPageToken if you've gotten all the messages. Alternatively, you could also use resultSizeEstimate and compare with your total retrieved messages to check if you have more mail to get.