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
To be able to open a browser tab directly focused on a specific draft of your choosing, from the drafts in your mailbox. (Correct me if I'm wrong).
Since the parameter needed is not publicly available via API, you can't achieve your goal at the moment. You can request the feature to Google directly by creating a "Feature Request" for the Gmail API. Here's the link Issue Tracker.
The way to make this url changed, now it works like this:
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