72

Since Gmail implemented multiple sign-on, I have been unable to create a bookmark URL that will always go to my "@gmail.com" inbox. For hosted domains, it's easy enough to make the bookmark URL: https://mail.google.com/a/example.com will always take you to your @example.com inbox. However, this does not work with @gmail.com addresses. I am aware of the https://mail.google.com/mail/u/[number] address form, however this address is dependent on the order in which you signed in to accounts during this browser session, and thus is not an acceptable URL that will always go to the same place.

Is there any URL that will always take me to @gmail.com address, assuming I am logged in to that account?

Javascript bookmarklets would be acceptable, but anything involving a plugin or add-on is not acceptable.

1

5 Answers 5

57

https://mail.google.com/mail/u/[email protected]

Seems to work quite fine for me.

11
  • 5
    This does not work for me. It takes me to the gmail login screen, but the user line is not pre-filled. I think this answer is out of date now.
    – Mnebuerquo
    Commented Nov 29, 2014 at 13:34
  • 3
    @Mnebuerquo - This answer still works for me. This question assumes that you are already logged in to your account.
    – aocole
    Commented Dec 10, 2014 at 19:59
  • Excellent, thank you. Seems to work for Google Drive too: drive.google.com/drive/u/[email protected]
    – rick
    Commented Apr 9, 2016 at 11:34
  • 4
    Better alternative: drive.google.com/drive/u/[email protected]. This has the benefit of adding parameters, such as drive.google.com/drive/u/[email protected]/search?q=asdf, useful for custom search queries
    – espinchi
    Commented Jul 27, 2017 at 12:59
  • 1
    This worked for me if you are already logged into the account in question. It also works for google-hosted/google apps accounts with a different domain, eg. [email protected].
    – Demis
    Commented Sep 18, 2017 at 20:29
36

Yes, once you are logged in, you can simply use your email address instead of the [number] in your URL. For example: https://mail.google.com/mail/u/[email protected]; this also works for Google Apps domains.

This also works great to go to a specific email, or filter, or so, with: https://mail.google.com/mail/u/[email protected]/#inbox/153d2095719946b

If you are not logged in to your [email protected] account yet, but to another account, then the link will not work and show "The conversation that you requested no longer exists."

4
  • 2
    Works as well as the accepted answer, and has the virtue of being shorter.
    – Kyralessa
    Commented Oct 24, 2018 at 7:18
  • 2
    This works for me, unlike the accepted answer Commented Oct 25, 2018 at 6:50
  • 4
    This also appears to work for third-party GSuite domains (i.e. https://mail.google.com/mail/u/[email protected]), whereas using https://mail.google.com/mail/u/[email protected] redirects to the default mailbox for me. Commented Nov 29, 2018 at 16:02
  • seen this type of link in stripe
    – vstepaniuk
    Commented May 9 at 10:19
25

Combining the information from the other answers with a fair bit of research, I believe this is the best way of referring to a particular GMail account:

https://accounts.google.com/ServiceLogin?service=mail&passive=true&[email protected]&continue=https://mail.google.com/mail/u/[email protected]/

This will redirect through accounts.google.com, making the relevant Email address log in if it isn't already logged in, and just select it if it is logged in. (If you remove passive=true, you'll always prompt for password.)

If you want to redirect to a particular fragment under GMail (e.g. to display a particular mail or contact), just URL encode the # as %23 - so add %23inbox/152bc41f0ca2d9bf at the end, like this:

https://accounts.google.com/ServiceLogin?service=mail&passive=true&[email protected]&continue=https://mail.google.com/mail/u/[email protected]/%23inbox/152bc41f0ca2d9bf

If what you want to do is create a pre-filled email, use a variant like the following:

https://accounts.google.com/ServiceLogin?service=mail&passive=true&[email protected]&continue=https://mail.google.com/mail/u/[email protected]/?view=cm%26fs=1%[email protected]%26su=SUBJECT%26body=BODY%[email protected]

Hat tip to robertwbradford for the parameters for send.

8
  • any way to pre-fill the password?
    – Kim
    Commented Jun 15, 2017 at 13:55
  • 1
    @Kim No. Absolutely and specifically not. That would be horrific user security. If you need to authorise on behalf of a user, use OAuth2.
    – Greg
    Commented Nov 26, 2017 at 17:08
  • Any tips on how to get a space into the body? I've tried + and %20 and &nbsp and they all break the link. Thanks for any help.
    – jaredcohe
    Commented Jun 18, 2018 at 0:34
  • 2
    It turns out that you have to use %2B for spaces because those convert into + when the url is processed.
    – jaredcohe
    Commented Jun 20, 2018 at 14:15
  • 1
    This is SO CLOSE to perfect. If I'm already logged into all my accounts, this URL form will redirect to the correct mailbox. If I'm completely signed out, it will prompt for login first. But if I am logged into ONE account and use the URL for the other, then Google can't be bothered to prompt for login because I'm ALREADY logged in -- so it skips the login and redirects to the WRONG account, just because it's logged in and the right account isn't. It will prompt for the login with "passive=false", but then it ALWAYS does. Why does Google's identity management suck so bad? It's ridiculous. Commented Nov 14, 2022 at 22:23
6

Try this out, the below URL seems to be working for me:

https://accounts.google.com/ServiceLoginAuth?continue=http%3A%2F%2Fgmail.google.com%2Fgmail&service=mail&Email=[email protected]

Though I couldn't pre fill password

3
  • This works for me. This url does not assume you are already logged in.
    – Mnebuerquo
    Commented Dec 19, 2014 at 14:28
  • Man, what prefilling of password are you talking about. Delete this and go learn some basic internet security before even using internet
    – vstepaniuk
    Commented Mar 3 at 4:42
  • using [email protected] (google workspace) we get: 404. That’s an error. The requested URL was not found on this server. That’s all we know.
    – BISI
    Commented May 8 at 19:09
2

Similarly to how you can form a URL to take you to a particular inbox, you can also form a URL to take you directly to a particular contact in a particular Gmail account like so:

https://mail.google.com/mail/u/[email protected]&?shva=1#contact/0123456789ABCDEF

Where 0123456789ABCDEF is the unique 16 character contact ID within that account.

After the ?authuser you include the &?shva=#1contact/ takes you the contact list for that user. You must include both characters &?.

This works regardless of how many Gmail accounts you are simultaneously logged into and regardless of login order. The ?authuser replaces the 0, 1, 2, etc. that Gmail typically substitutes.

Not the answer you're looking for? Browse other questions tagged or ask your own question.