Use Access Tokens
A personal access token is a long-lived secret you create in webmail and paste into a mail client that cannot complete an OAuth sign-in. Every user can create tokens for their own account. A token never allows more than you can do yourself: it only limits what the client may do, and it stops working when your own access ends.
Create a token
Section titled “Create a token”- Sign in to webmail and open Settings, then Access tokens.
- Choose New token and enter a name that tells you which client will use it, for example
Phone. Names are 1 to 64 characters and must be unique among your active tokens. - Under What the token may do, choose what the client may reach. Each entry applies to all of your accounts or to one account you choose, and lists the rights the token holds there. Give a client only the rights it needs: a client that only reads mail needs no right to send or delete.
- Set Valid for (days), between 1 and 365. The default is 90 days.
- Choose Create token.
The new secret is shown once. Copy it now and store it in the client or in a password manager. It cannot be shown
again; if you lose it, rotate the token to get a new one. The secret starts with sipat_.
A token can never create, rotate or revoke tokens. You manage tokens in webmail, signed in with your own account.
Configure a client
Section titled “Configure a client”Use the token wherever the client asks for a credential, with the same JMAP hostname you would use for any other client (see Setup Email Client). Two forms are accepted.
| The client sends | Configure |
|---|---|
| A Bearer token | Choose bearer-token or access-token authentication and paste the secret. |
| Basic authentication | Enter any username and the secret as the password. The username is ignored. |
On the wire these are Authorization: Bearer sipat_... or Authorization: Basic <base64 of username:sipat_...>.
Expiry and rotation
Section titled “Expiry and rotation”Each token has an expiry date, set by the validity period you chose. Fourteen days and three days before a token expires, you receive a notice. After it expires, the client is refused until you rotate the token.
Rotating gives the token a new secret and a new expiry, counted from the moment you rotate. The token keeps its name and its limits. The rotate dialog shows the validity period, pre-filled with the token’s current one, so you can renew for the same period or choose another between 1 and 365 days. There is no overall lifetime limit: a token you keep rotating can serve a client for years.
- Rotating an active token keeps the previous secret working for 24 hours, so you can move the client to the new secret without an outage.
- Rotating an expired or revoked token makes it active again, with a new secret and no overlap. This works for 30 days after the token expired or was revoked; after that the token is removed from the list. If another active token already uses the name, or you already have 20 active tokens, reactivation is refused.
A token can be rotated once an hour.
Revoke a token
Section titled “Revoke a token”Choose Revoke next to a token to stop it for good, for example when a phone is lost. Both the current and the previous secret stop working. Revocation takes effect within 10 minutes. A revoked token stays in the list (under inactive tokens) for 30 days, and can be reactivated by rotating it.
When your own access to the mailbox ends, for example because an administrator disables your user, your tokens are revoked with it.
Notices
Section titled “Notices”Each time you create, rotate or revoke a token, and when a token is about to expire, a message arrives as an unread message in the Inbox of your primary account. The message names the token and its dates and never contains the secret.
Limits
Section titled “Limits”| Limit | Value |
|---|---|
| Active tokens per user | 20 |
| Tokens created per hour | 5 |
| Rotations per token per hour | 1 |
| Validity per creation or rotation | 1 to 365 days (default 90) |
| Name length | 1 to 64 characters |
| Expired or revoked tokens remain listed and can be reactivated | 30 days |
The list shows each token’s name, its last four characters, its status and when it expires. Open a token to see what it may do, when it was created and when it was last used.
If a client is refused
Section titled “If a client is refused”| What you see | What it usually means |
|---|---|
| The client is refused straight after you pasted the secret | The secret was copied incompletely, or the token has expired or been revoked. Check its status in Access tokens and rotate it. |
| The client works for some actions and is refused for others | The token’s limits do not include the right the action needs. Create a new token with that right; a token’s limits cannot be changed after creation. |
| Webmail asks you to sign in again when you open Access tokens | Your sign-in predates token management. Sign in again. |