Authentication Method
The Zoho Mail plugin uses OAuth 2.0 authentication exclusively.oauth_2(default) - OAuth 2.0 authentication
Pick your region first
Zoho runs region-specific datacenters. The OAuth (accounts.zoho.*) and Mail API
(mail.zoho.*) hosts share the same top-level domain, and tokens issued in one
region do not work in another. Register the plugin with the matching region:
| Region | Domain | region value |
|---|---|---|
| United States | zoho.com | 'us' (default) |
| Europe | zoho.eu | 'eu' |
| India | zoho.in | 'in' |
| Australia | zoho.com.au | 'au' |
| Japan | zoho.jp | 'jp' |
| China | zoho.com.cn | 'cn' |
corsair.ts
https://api-console.zoho.eu for the EU).
OAuth 2.0 Setup
Step 1: Create a Server-based Application
- Go to the Zoho API Console for your region
- Click Add Client → Server-based Applications
- Fill in:
- Client Name: your application name
- Homepage URL: your application URL
- Authorized Redirect URIs: your callback URL (e.g.
https://yourapp.com/auth/zohomail/callback)
- Click Create
- Copy the Client ID and Client Secret
Step 2: Authorize the required scopes
The plugin requests these scopes during the OAuth flow:ZohoMail.messages.ALL— read, send, move, delete, and flag emailsZohoMail.folders.ALL— list, create, update, and delete foldersZohoMail.accounts.READ— resolve the account ID for the authenticated user
access_type=offline so Zoho returns a refresh token (the plugin
refreshes the access token automatically as it expires).
Step 3: Store credentials
The preferred method is to store OAuth credentials in the database using the keys API:corsair.ts
Required Credentials Summary
| Credential | Required For | Where to Find |
|---|---|---|
| Client ID | OAuth 2.0 | Zoho API Console → your app |
| Client Secret | OAuth 2.0 | Zoho API Console → your app |
| Access Token | OAuth 2.0 | Obtained automatically after OAuth flow |
| Refresh Token | OAuth 2.0 | Obtained automatically after OAuth flow (requires access_type=offline) |