Search code examples
gmailgmail-api

How does a Gmail message Id or ThreadId map to the new Gmail UI?


Edit: addressing the first comment below and for clarity, this isn't a code question. The question is simply:

What do I put into the URI querystring of the new Gmail UI to view a draft message created by the Gmail API?

Despite this not really being a code question, I'm asking on Stack Overflow as it's Google's preferred platform for Gmail API questions.

--

If I view a draft message in the new Gmail UI, the URI is something like this:

https://mail.google.com/mail/u/1/?zx=iij9apqgzdf4#drafts?compose=jrjtXSqXwlFGnSGCQgDCdnHGVFdlpFMgzsCNgpQstQLxdLCMkjKstBmWZkCmjhWTQnpsZCJF

I can't see any way to create such a link from the Id or ThreadId of a message created via the Gmail API.

Previously, one could do this:

https://mail.google.com/mail/u/1/?zx=ov61dxfbrcga#drafts?compose=1631caae9dbb074d

where the value of "compose" is the Id.

How can the same thing be accomplished in the new UI?


Solution

  • Thanks to @frank-szilinski - he pointed out that the old format is now translated. I.e. this now works again:

    https://mail.google.com/mail/ca/u/1/#drafts/1661237c4db71ace

    It doesn't seem to work when the Gmail tab isn't already open, however.