在使用Google自己生成的电子邮件时,我似乎表现出来了 . 我有JSON格式的示例,以允许其他人将问题重现到我创建的GitHub问题:https://github.com/google/google-api-python-client/issues/468
-
我使用"get"请求(https://developers.google.com/gmail/api/v1/reference/users/messages/get)获取电子邮件,并将其存储在两个不同列的PostgreSQL数据库中,包括原始格式和完整格式 .
-
我使用"delete"请求(https://developers.google.com/gmail/api/v1/reference/users/messages/delete)从Gmail中删除电子邮件 .
-
我使用数据的原始格式和"insert"请求(https://developers.google.com/gmail/api/v1/reference/users/messages/insert)将电子邮件放回用户收件箱 . 使用Google发送给用户Gmail帐户的电子邮件时,它会在我们的软件和Gmail之间移动而不会出现问题 .
使用我从Gmail帐户发送到另一个Gmail帐户的电子邮件时,它会给我一个错误 . 如果我发送电子邮件的JSON格式(完整格式),我会收到400错误 . 如果我发送电子邮件的原始格式,我会收到404未找到错误 .
确切的错误:
404 - https://www.googleapis.com/gmail/v1/users/me/messages?alt=json返回“未找到”> 400 - https://www.googleapis.com/gmail/v1/users/ me / messages?alt = json返回“'raw'RFC822有效负载消息字符串或通过/ upload / * URL上传消息”>
我正在使用Python3.6和Google API Client 1.6.4
有谁知道这是否是客户端软件中的错误,还是在使用此API插入电子邮件时还需要考虑其他问题?