问题标签 [gmail-api]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
3762 浏览

email - 是否有一个 URL 可以全屏(弹出)打开具有特定邮件 ID 的 Gmail 撰写窗口

我使用新的Gmail API为我的用户创建草稿。API 响应提供新创建的消息 ID。

然后我可以使用 URL 打开撰写窗口https://mail.google.com/mail/#drafts?compose=[message-id]。但是我想打开一个全屏(弹出)撰写窗口。有那个网址吗?这个 URL 当然必须使用消息 ID 进行参数化。

更准确地说,这就是我得到的,这就是我想要的。

0 投票
0 回答
1682 浏览

c# - Gmail 撰写 api:500 后端错误

我正在尝试为使用服务帐户的用户创建草稿。因此,我在开发者控制台中创建了一个服务帐户,并授予它访问 gmail compose api 的权限。我找到了这个例子:https://google-developers.appspot.com/api-client-library/dotnet/guide/aaa_oauth?hl=lv#service_account并将其更改为使用 gmail compose api,如下所示:

这应该会创建一个空草稿,我已经在https://developers.google.com/gmail/api/v1/reference/users/drafts/create上使用 API Explorer 对其进行了测试。但是,我得到的只是一个没有任何有用信息的后端错误:

我检查了我使用 Fiddler 发送的请求,它看起来像这样:{"message":{"payload":{"body":{"data":""}}}},与请求完全相同我用 API Explorer 做了。我在这里做错了什么?很感谢任何形式的帮助。

更新:我也试过

我得到同样的错误信息。看起来我无法访问任何api?

0 投票
1 回答
1979 浏览

python - Gmail 应用程序 - 快速入门,错误:redirect_uri_mismatch

我正在关注 Google 开发人员“快速入门:在 Python 中运行 Gmail 应用程序” https://developers.google.com/gmail/api/quickstart/quickstart-python

在步骤 3“运行示例”之前一切正常,其中的说明是“使用 python quickstart.py 运行示例”。

当我这样做时,预期的结果是我的浏览器将加载并启动授权。相反,我在 Google 上得到了错误 400 页面。

问题是,“localhost ...”不在重定向 URI 中,我检查了许多其他类似的问题,通常答案表明确认 URL 完全相同。我已经做到了,https/http,额外的反斜杠,都是一样的。谷歌仍然说我正在发送 localhost:8080。

0 投票
2 回答
5547 浏览

python - 在新的 Gmail API 中批量提取电子邮件

我正在使用 Google 新发布的 Gmail API 的 python 版本。

以下调用仅返回消息 ID 列表:

但后来我只有一个消息 ID 列表,需要遍历它们并一个接一个地获取它们。

有没有办法在一次调用中获取 id 列表的整个消息内容?(类似于在 Google Calendar API 中的操作方式)?

如果还不支持,Google 是否会考虑在 API 中添加这些内容?

更新

这是对我有用的解决方案:
batch = BatchHttpRequest() for msg_id in message_ids: batch.add(service.users().messages().get(userId = 'me', id = msg_id['id']), callback = mycallbackfunc) batch.execute()

0 投票
2 回答
97 浏览

google-oauth - 我收到的 gmail 回复问题

我正在尝试从 gmail 获得回复,但我的回复是这样的,Status=Moved Temporarily, StatusCode=302我无法理解我传递的网址有什么问题。这是我正在使用的网址

当我尝试从谷歌的响应中使用浏览器上生成的 url 时,我已被重定向到在此处输入图像描述

这一页。请告诉我这个网址有什么问题或者我需要添加什么以及我需要做的任何其他事情,请指导我获得解决方案。

0 投票
1 回答
1727 浏览

python - Gmail api 线程列表片段

我一直在尝试使用 GMail API 和客户端库。我可以使用 javascript 节点 SDK 来获取线程列表,但片段返回为“”。

然后我下载了python SDK并使用gmail api示例获得了一个线程列表,并注意到那些也有空片段。

线程 ID: {u'snippet': u'', u'id': u'146fccb21d960498', u'historyId': u'7177452'}

但是,当我通过 get thread 方法请求线程时,我确实得到了一个片段,但它只在线程列表中丢失。

我需要在请求中包含其他详细信息以获取代码段吗?

谢谢!

0 投票
2 回答
2670 浏览

javascript - Gmail API limitations for getting mails

As I understand currently google's API provides 10 requests per second to its API (from their docs), and it looks to be far from enough for comfortable work with mail. I need to get all emails' headers (or at least senders and recipients). Is there anything better than waiting numberOfMails / 10 seconds?

I'm currently accessing API from client side JavaScript application, I'm thinking of distributing API calls for the same user over a number of machines/applications, but's still unclear if their limits apply to gmail user or registered application.

Anyway, hope to get some ideas what to do with it, with current quota it's completely not usable.

0 投票
0 回答
182 浏览

javascript - 有什么方法可以访问 Gmail 中的便笺?[JavaScript / Node.js]

我正在编写一个开源应用程序,帮助用户将笔记和短文本片段可视化为图表,以查看它们是如何连接的。

我已经将它连接到 Evernote 和 Twitter,现在还希望能够从 Gmail 的 Notes 文件夹中导入笔记。但是,我找不到任何 API。

有人知道如何从 Gmail 导入笔记吗?

也许有一个具有此功能的 Node.js 模块(我看过但没有找到)。

0 投票
2 回答
1221 浏览

python - Email body is returned as encrypted text? How do I read the actual message?

As part of the payload returned for messages.get(), I get the following

How do read the actual message? Basically, how do I decrypt/decode this information so it's actual English text?

I'm using the Python libraries for the Gmail API.

0 投票
2 回答
1605 浏览

gmail-api - 使用 GMAIL API 获取一个附件的唯一 ID

我正在使用新的 GMail API。我的目标是获取每封电子邮件的所有附件列表。它已经完成并且正在工作。

现在,当用户单击每个附件时,我想获得在每个附件的新窗口中打开的直接链接。我怎样才能得到那个“身份证”?

这就是我所做的:

我使用 JAVA。

谢谢你,迭戈。