Im trying to create a gmail draft using gmail API and open it in a new tab.
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.
You can reproduce it following this steps
- 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.
More information about the problem
It does not work with https://mail.google.com/mail/u/0/#drafts/?compose= neither
Chrome console throws this error when i try to open a draft from another tab console error
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?
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.
So the question is, how can i create a url to open a gmail draft using Gmail API ?