gmail api returning total messages as 0 for a particular Label

630 Views Asked by At

I have been using the "Get Label" API to get the details of a particular Label.

It was all working until the last couple of days.

What I now observe is that the "Total Messages" Count is always 0. "UnRead Messages" Count show up properly.

I have used it in my application and also tried it from https://developers.google.com/gmail/api/v1/reference/users/labels/get - "Try It Now" and the result is the same --- 0 Total Messages

1

There are 1 best solutions below

0
On

As noted in the comments to the question, there's an apparent bug in the API as reported here.

FWIW I'm running into the same issue.

In my case I have three accounts, all created programmatically by the same code, all containing messages inserted programmatically by the same code. The get label API repeatably reports the correct number of messages for one account while erroneously reporting zero messages for the other two accounts. Viewing the account in the web interface shows all the messages in all the accounts as expected.