【发布时间】:2015-06-30 08:02:54
【问题描述】:
Gmail REST API 中似乎存在严重问题。
- 调用/userId/messages获取消息列表
- 对于每个,调用 /userId/messages/id 来获取消息
- 获取每个消息对象的最高(或任何)startHistoryId
- 然后调用 /userId/history/list 传递 startHistoryId 作为参数
结果出乎意料。 Gmail REST API 返回 404 Not Found.. 返回的 historyId 似乎未注册或无效。
在调用 /userId/profile 时,startHistoryId 有效,可以在 /userId/history/list 调用中成功使用。
com.google.api.client.googleapis.json.GoogleJsonResponseException: 404 Not Found
{
"code" : 404,
"errors" : [ {
"domain" : "global",
"message" : "Not Found",
"reason" : "notFound"
} ],
"message" : "Not Found"
}
【问题讨论】:
-
这是因为 Gmail 仅在创建邮件时才为邮件创建 historyId?如果消息是很久以前创建的,那么历史引用会被删除吗?
标签: gmail-api