GMail v1 API Users.messages results differ from Web UI on logical AND/OR

后端 未结 1 1756
暖寄归人
暖寄归人 2021-01-21 21:48

I\'m using the following query:

No Man\'s Sky

I get different results from the Web UI compared with the API Explorer and my C# appli

相关标签:
1条回答
  • 2021-01-21 22:13

    I tried it with my own Gmail, and I observed that some emails are found in a single thread.

    Here is my example:

    I used the word time tracker as my subject, and the Gmail UI gives me a result of 4 emails. But if you count the total results, it gives me a total of 12 results. 6 from A, 3 from B, 2 from C and 1 email from D.

    So if I use the request

    GET https://www.googleapis.com/gmail/v1/users/example%40google.com/messages?q=subject%3A(time+tracker)&fields=messages(id%2CthreadId)&key={YOUR_API_KEY}
    

    or the Try it part in the Gmail API,

    It will give me a result of 12 IDs like in the GMail UI.

    Looking at the illustration above, you will notice that all emails belonging to the same thread have identical threadId.

    So try to use the threadId to determine the number of emails found in your request. Please someone tell me if I misunderstood this question.

    0 讨论(0)
提交回复
热议问题