I'm using the Javascript client API with my app and I'm trying to get unread mails from the primary inbox.
If I use the INBOX and UNREAD names when requesting the labels I get all unread mails from all labels.
No other label type name works, I've experimented in APIs explorer and i can't seem to figure out how to manage this.
Am I missing something or is it not possible?
You can try this "in:inbox is:unread -category:(promotions OR social)" as a value for q parameter in messages.list. I tried this in API explorer, and it gave correct results.
I have 4 "UNREAD" mails(or Threads) in my inbox, and response is:
200 OK
You could try "in:unread category:primary "
Try also this "in:inbox is:unread category:primary"