Skip to content

OAuth and API integration ​

Provider sign-in ​

Select a provider in System Settings → OAuth Integration, enter its Client ID and Client Secret, and enable it.

ProviderApplication settingsCallback path
NodeLocApplications/oauth/nodeloc
TelegramBotFather → Login Widget/oauth/telegram
DiscordDeveloper Portal → OAuth2/oauth/discord
GitHubDeveloper settings → OAuth Apps/oauth/github
GoogleGoogle Auth Platform → Web application client/oauth/google
LinuxDoLinuxDo Connect/oauth/linuxdo

The settings page generates the callback URL for your site. Register it with the provider, for example https://mail.example.com/oauth/github.

Users must create an account through the site's registration flow before linking a provider in Personal Settings → Connected accounts. Sign-in only opens an already linked account and does not register users automatically.

Client secrets are stored on the server. See the Worker configuration example for environment variables.

Mail query API ​

Generate a global API token in System Settings and send it in the x-admin-auth header.

http
GET /api/admin/mails?limit=20&offset=0&[email protected]
x-admin-auth: <your-token>

Send the request to your Xi-Mail site and replace <your-token> with the generated token.

MIT License · Based on cloud-mail