查找 Gmail 邮件的 ID

Finding the ID of a gmail message

我目前正在使用 Gmail API。

https://developers.google.com/gmail/api/v1/reference/users/messages/get

有谁知道如何找到电子邮件 ID?

谢谢!

您需要先按照此处所述创建一个列表(如果您对所有消息不感兴趣,它在 q 参数中具有搜索语义):https://developers.google.com/gmail/api/v1/reference/users/messages/list

此 returns 邮件列表如下所示: https://developers.google.com/gmail/api/v1/reference/users/messages#resource

消息id为id字段("id":字符串)

要查找您需要打开消息的消息 ID,请按“...”-> 显示原始消息。 会有消息ID。但它的格式很奇怪,Gmail API 无法理解。