Policies & help › Developers

OAuth Authentication

Effective 8 October 2026 · Version 1.0

How sign-in and API access work in Indo Mail today (password, bearer tokens, 2-step verification, limited tokens), and the planned OAuth 2.0 and OpenID Connect provider for third-party apps.

1. Summary

Today, Indo Mail has no public OAuth provider. Nobody outside Indo Mail can register an app that asks users for permission to read their mail, and "Sign in with Indo Mail" does not exist yet. The only way to use the API is to sign in as the account owner with a password.

This page explains how that works, which safeguards protect it, and the OAuth 2.0 and OpenID Connect design that we plan to build. Everything in the planned sections is a design, not a promise of dates.

2. How sign-in works today

PartHow it works
IdentityA person signs in with their full address (or username) and a password.
Password rulesBetween 8 and 128 characters, with at least one letter and one number.
Password storagePasswords are stored only as bcrypt hashes. We cannot read them, and we never email them.
Session tokenA correct password returns a bearer token, a signed JSON Web Token. It is valid for 7 days. The app sends it as Authorization: Bearer <token> on every call.
Rate limitingSign-in, sign-up, the second sign-in step and password change are limited to 20 attempts per 15 minutes per client. Failed attempts are recorded in sign-in history.
Disabled accountsA disabled account, or an account whose business domain is suspended, cannot sign in. Tokens are checked again on use.
Sign-in historyEvery sign-in records time, IP address and device. The account owner sees it in Settings, and in the API at GET /api/auth/activity.

Treat a bearer token like a password. Anyone who has it can act as you for up to 7 days. If a token leaks, change your password at once.

3. 2-Step Verification (TOTP)

2-Step Verification is live for all accounts. It uses time-based one-time passwords (TOTP), the standard used by authenticator apps. The flow is:

Passkeys, SMS codes and backup codes are not available yet. They are planned.

4. Limited tokens

Some tokens are deliberately narrow, so that a leak does little harm. These are in use now:

TokenLastsCan be used for
Live stream ticket (POST /api/mail/events-ticket)60 secondsOpening the stream that tells the app about new mail. It cannot read or send anything.
Signed download link (attachments and Drive files)Short-lived; expires quicklyDownloading one file. The link names the file and the account.
Two-step sign-in ticket5 minutesCompleting the second step of sign-in only.
Android device token (Web Push registration for the app)Until sign-out or removal in SettingsChecking for notifications for that device. It cannot open mail.

5. Why not give apps your password?

Sharing a password with an app is a bad idea. The app sees everything the account can do, you cannot limit it, you cannot stop it without changing your password, and it cannot use 2-Step Verification properly. OAuth solves each of these. Until it exists, please do not give your Indo Mail password to any third-party app or website. Indo Mail does not endorse any such app.

6. Planned: OAuth 2.0 and OpenID Connect provider

Planned, not live. We intend to become an OAuth 2.0 authorisation server and an OpenID Connect identity provider, so that other apps can ask a user for limited permission, and so that "Sign in with Indo Mail" works. The design follows current best practice:

7. Planned scopes

Scopes will be narrow. An app asks only for what it needs, and the user can see and remove each one.

ScopeAllowsSensitivity
openidIdentify the user with a stable IDBasic
profileRead display nameBasic
emailRead the user's Indo Mail addressBasic
mail.sendSend mail as the user, but not read itRestricted
mail.readonlyRead messages and labelsRestricted, needs review
mail.modifyRead, label, archive and delete messagesRestricted, needs review
contacts.readonlyRead contactsSensitive
drive.fileCreate files and read only files the app createdSensitive
drive.readonlyRead all Drive filesRestricted, needs review
wallet.requestCreate UPI payment requests for the userSensitive
ads.readRead an advertiser's own campaign reports and leadsSensitive
adminManage a business domain, for company administrators onlyRestricted, needs review
offline_accessReceive a refresh tokenBasic

Scopes that give access to mail or all files will not be available to apps until the app and its developer have passed review.

8. Planned token lifetimes

ItemPlanned lifetime
Authorisation code10 minutes, single use
Access token1 hour
Refresh token30 days of inactivity, rotated at each use
ID token1 hour
User consentUntil the user withdraws it

9. Planned app review

Any app that asks for a restricted scope must be reviewed before more than 100 users can approve it. Review will check:

10. Planned revocation

11. Contact

Questions about authentication, or early access to the planned provider: contact@indoemail.in with the subject "Developer access". Security reports: security@indoemail.in.

INDO CHATS PRIVATE LIMITED, 168, GT Rd, near Aloka Cinema, Shibpur, Howrah, West Bengal 711102, India.