【发布时间】:2015-09-26 20:22:57
【问题描述】:
我正在使用 gmail API 列出线程,但我发现使用 users_threads->get 无法找到从 users_threads->list 返回的某些项目。这些项目也无法通过 gmail 的 Web UI 看到。
我正在使用 gmail 的 api explorer (https://developers.google.com/gmail/api/v1/reference/users/threads/list) 来测试列表线程。
我的收件箱对于经过身份验证的帐户是空的。
站点发出类似GET https://www.googleapis.com/gmail/v1/users/me/threads?labelIds=INBOX&key={YOUR_API_KEY} 的请求并返回此结果集:
200 OK
cache-control: no-cache, no-store, max-age=0, must-revalidate
content-encoding: gzip
content-length: 287
content-type: application/json; charset=UTF-8
date: Wed, 08 Jul 2015 18:23:25 GMT
etag: "A_TI-e9NgLq0wln5q88xm3zdvSg/6meEdFVG8voZD7dqGr76UTURSRk"
expires: Fri, 01 Jan 1990 00:00:00 GMT
pragma: no-cache
server: GSE
vary: Origin, X-Origin
{
"threads": [
{
"id": "14a78517c954ec9c",
"snippet": "",
"historyId": "806722"
},
{
"id": "149daea953d5674e",
"snippet": "",
"historyId": "688170"
},
{
"id": "149d462f26b543db",
"snippet": "",
"historyId": "686319"
},
{
"id": "149ac0958a5b44e8",
"snippet": "",
"historyId": "657008"
},
{
"id": "149ac0c2caea09f7",
"snippet": "",
"historyId": "656272"
},
{
"id": "149ac08d36ce3087",
"snippet": "",
"historyId": "656263"
},
{
"id": "148e3ab2c048f49e",
"snippet": "",
"historyId": "491569"
},
{
"id": "147a123d780d44a7",
"snippet": "",
"historyId": "186314"
},
{
"id": "1478f8b6c004dddb",
"snippet": "",
"historyId": "178535"
},
{
"id": "1478cf683ca0dc8d",
"snippet": "",
"historyId": "177603"
},
{
"id": "14788aa2aba1f35a",
"snippet": "",
"historyId": "173433"
}
],
"resultSizeEstimate": 11
}
当我期望0 时,它似乎返回11 对象。
此外,如果我对这些项目中的任何一个使用 threads->get api (https://developers.google.com/gmail/api/v1/reference/users/threads/get),我会收到以下响应:
GET https://www.googleapis.com/gmail/v1/users/me/threads/1478cf683ca0dc8d?key={YOUR_API_KEY}
404 Not Found
cache-control: private, max-age=0
content-encoding: gzip
content-length: 120
content-type: application/json; charset=UTF-8
date: Wed, 08 Jul 2015 18:30:21 GMT
expires: Wed, 08 Jul 2015 18:30:21 GMT
server: GSE
vary: Origin, X-Origin
{
"error": {
"errors": [
{
"domain": "global",
"reason": "notFound",
"message": "Not Found"
}
],
"code": 404,
"message": "Not Found"
}
}
API 中似乎存在错误。根据support page,我应该使用gmail-api 标记将所有关注点转移到stackoverflow,我已经这样做了。
如果 stackoverflow 上的共识是这是一个产品错误,我会submit an issue with the product team,因为我还没有找到任何类似的错误提交。
感谢您为解决此问题提供的任何帮助。
【问题讨论】:
标签: gmail-api