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.
| Provider | Application settings | Callback path |
|---|---|---|
| NodeLoc | Applications | /oauth/nodeloc |
| Telegram | BotFather → Login Widget | /oauth/telegram |
| Discord | Developer Portal → OAuth2 | /oauth/discord |
| GitHub | Developer settings → OAuth Apps | /oauth/github |
| Google Auth Platform → Web application client | /oauth/google | |
| LinuxDo | LinuxDo 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.
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.