In order to provide the URL to the draft API created, this works:
... final Gmail.Users.Drafts.Create request = gmailService.users().drafts().create("me", content); final Draft response = request.execute(); final String url = "https://mail.google.com/mail/ca/u/0/#drafts/" + response.getMessage().getThreadId() ...
When a user clicks on it, gmail redirects (and redirects) to another URL, but opens the correct draft. However, I did not find a mention of this in the documentation, so this may be an unsupported function that stops working once.
Credits: @Chris Wood from this SO question stackoverflow.com/q/50124112/455449 (see his comment below the question)
source share