Understanding Gmail Temp Inboxes, Browser Tokens & Data Retention

Learn how Gmail Temp inboxes work, how cryptographic browser access tokens function, and how expiration and data retention are managed.

TempMail Team

Understanding Gmail Temp Inboxes, Browser Tokens & Data Retention

Our Gmail Temp inbox is one of the most useful tools in TempMail. It lets you receive your verification codes and test signups using real @gmail.com addresses. As Gmail Temp works very differently to a regular email account (or generic domain), this means people regularly ask us questions about inbox expiry and browser access.

In this complete technical guide we'll walk through the cryptographic token system, explain what happens when your alias expires, show how your web browser stores your token and tell you everything you need to know about our very transparent data retention.


1. Cryptographic Bearer Tokens

When you create a Gmail Temp alias, no password or account is created on our servers. Instead, your application will generate a 64 character long cryptographic bearer token.

  • Client Side Storage: This token will be stored in your browsers HTML5 localStorage with the key name temp-mail-gmail-inbox-v1. Once stored, it will stay stored between page refreshes and sessions.
  • One Way Hashing: When your browser makes requests to view messages, our server will simply generate a SHA-256 hash of the token provided. We never store the plaintext of this token on our database servers, meaning we have no knowledge of the token.
  • Viewing Messages: When viewing your inbox, your browser will send the token to our server via an Authorization: Bearer header. Our server will generate the SHA-256 hash and match it against the records for your alias. Your messages will then be shown.
Component Stored Expires Purpose
Bearer Token Browser (localStorage) Cleared/alias expires Authorises your browser to view messages
SHA-256 Hash Database (Non-public) Admin maintenance Validates requests to view messages without having access to plaintext credentials
Hidden Message ID Browser (localStorage) Browser cleared Stores which messages you've deleted in the reader

2. What happens when my Gmail Temp inbox expires?

All Gmail Temp aliases have a set time to live. Once the expiry date and time has passed:

  • Public Access: Any requests to the public API with this token will result in an error (HTTP 404).
  • No Public Recovery: There is no public password recovery tool or method of recovering your data. Once an alias has expired or your browser has been cleared, you will lose public access.
  • Non-public Data Retention: As outlined in our Privacy Policy, we will retain the data from expired aliases and any messages imported. This is so we can administer our system, monitor for abuse and ensure security. These will be deleted during our admin maintenance.

3. Multiple Devices & Browsers

As we use a unique token that is stored locally in your browsers HTML5, your Gmail Temp inbox will not sync between multiple devices.

  • If you create a Gmail Temp address on your laptop and then open TempMail on your phone, you will get a completely new alias.
  • If you open TempMail in a Private Browsing (incognito) window, your data will be stored in its own temporary partition. Closing your incognito window will cause your token to be removed from your browser instantly.
  • If you want your inbox to be the same across multiple sessions, don't open TempMail in incognito mode and don't clear your cookies and site data whilst waiting for your verification emails.

4. Important Notes

When using Gmail Temp, remember the following:

  • Read Only OAuth: We have read only access to the Google APIs (gmail.readonly). This means we cannot write any emails, messages or make any changes to messages on Google.
  • Messages aren't deleted: When you click delete on a message in the Gmail Temp reader, it will only be hidden from your browsers local storage. Due to the read only OAuth, the message won't be deleted from your Google account.
  • Don't use for Permanent Accounts: Never use a temporary Gmail alias for any accounts that you may need to recover in future (banking, medical etc.). Always use your real personal email address for any services you'll be using.

5. FAQ

Can I prolong my Gmail Temp inbox?

No, unlike our 10 Minute Mail tool, Gmail Temp inboxes have a set time to live based on the rules set by the admin. Just make sure you finish your verification process whilst your session is still active.

What if I close my browser tab by accident?

As long as you open TempMail in the same browser profile within the expiry time, your token will still be stored in your localStorage and your inbox will automatically load.

Browse more articles