问题描述
我正在尝试使用gmail API创建gmail草稿,并在新标签页中打开它.
当我尝试使用以下网址打开草稿时:> https://mail.google.com/mail/u/0/#drafts/草稿ID,但从外部网络无法打开草稿.相反,它列出了草稿.如果我在Gmail标签中执行相同的操作,它将按预期工作.
When i try to open a draft using the following url : https://mail.google.com/mail/u/0/#drafts/ draft id , from a external web it does not open the draft. Instead it lists the drafts.If i do the same in a Gmail tab it works as expected.
您可以按照以下步骤进行复制
- 选择任何草稿并复制其消息ID,您可以使用此
- 创建一个链接,网址为> https://mail.google.com/mail /u/0/#drafts/ +您在上一步中获得的消息ID.
- 在Chrome中打开一个新标签页并将其粘贴,它将把您发送到草稿列表中.
- 如果将相同的网址粘贴到相同的标签中,则会打开草稿.
- Chose any draft and copy its message id , you can use this
- Create a url joining https://mail.google.com/mail/u/0/#drafts/ + the message id you got in the last step.
- Open a new tab in Chrome and paste it, it will send you to your draft list.
- If you paste the same url in the the same tab it will open the draft.
有关该问题的更多信息
它不适用于 https://mail.google .com/mail/u/0/#drafts/?compose = 都不
当我尝试从另一个标签打开草稿时,Chrome控制台抛出此错误控制台错误
Chrome console throws this error when i try to open a draft from another tabconsole error
我注意到,如果你打开一个草案的URL是这样一个的 https://mail.google.com/mail/u/0/#drafts?compose=JHrtffLJpZXxNwzKGMhcjvjBrqfPRwKWvkvJbtWpRffXldzxkNQhmkkBWJsHPbdSPdDgBVKpHKZMNtCVFJXH从...
I noticed if you open a draft the url is like this one https://mail.google.com/mail/u/0/#drafts?compose=JHrtffLJpZXxNwzKGMhcjvjBrqfPRwKWvkvJbtWpRffXldzxkNQhmkkBWJsHPbdSPdDgBVKpHKZMNtCVFgXrhwMCVjCdCRqTLJhGvqrXNKFZmJDGZ , this url works also to open the draft editor from other tabs, but where does the compose value come from?
我知道这不是API错误或问题,但是如果有人遇到相同的问题,并且知道解决该问题的任何方法,我都会感激不尽.
I know it is not a API error or problem but if somebody had the same problem and know any way to solve it i will apreciate.
所以问题是,如何创建一个使用Gmail API打开gmail草稿的网址?
推荐答案
更改此url的方式,现在它的工作方式如下:
mail.google.com/mail/#inbox?compose=draft.message.id
mail.google.com/mail/#inbox?compose=draft.message.id
如果您列出了草稿,您将得到
If you list your drafts you get
{
"drafts": [
{
"id": "r5632827412362757569",
"message": {
"id": "174f4fa0dd96af123",
"threadId": "174f4f59344d6321"
}
}
],
...
}
因此,要打开此草稿,您需要以下网址:
So, to open this draft you need the following url :
mail.google.com/mail/#inbox?compose=174f4fa0dd96af123
mail.google.com/mail/#inbox?compose=174f4fa0dd96af123
这篇关于如何在浏览器中打开使用Gmail API创建的草稿?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!