Per this SO thread I should be able to go directly to a Gmail draft message, created using the Gmail REST API, using a hyperlink formatted like:
https://mail.google.com/mail/#drafts?compose={ThreadId}
However, it's not working. The thread ID I get as a response to my Gmail API call does not open the draft message created. What's really strange is when I open the draft from Gmail (that I created using the API) the thread ID DOES match for a split second in the URL then changes.
How does one open directly to a draft message utilizing the message.threadId? I'd like it to be a pop out message as well and should be possible per this thread but getting the draft to show at all is my first priority.
The thread id/message id of a draft are not stable. That is, they change everytime the draft is edited/saved. The only thing that is stable is the draft id, however, this is not available in the gmail ui.
The Users.drafts.create API call returns a User.drafts resource containing the draft ID. The draft ID is not the same thing as a message or thread ID, but you can then call Users.drafts.get or Users.drafts.list, both of which will let you correlate the draft ID to a thread ID and message ID.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With