Spanish Total.js
English
Documentation For AI agents
Contents

API tokens

Create a token for every app that sends email through OpenMail.

.md GitHub
On this page

Your apps send email with an API token. Give every app its own token, so you can change one without touching the others.

The Tokens screen with the tokens Demo app and Website

Create a token

1. Click the key icon on the left to open Tokens, then click Create.

2. Enter a Name, for example Demo app.

3. Access token is already filled with a random value. Keep it, or enter your own (5 to 50 characters).

4. Leave Allow read list of profiles checked if the app needs the list of templates. See List profiles.

5. Click SUBMIT.

The token form with the name, access token and Allow read list of profiles

The value is shown as dots. To copy it for your app, click the token card to open it, click into Access token, select the value and copy it.

What a token can do

Every token can send email with any template of any profile. With Allow read list of profiles it can also read the list of profiles and templates. A token gives no access to the admin interface.

Change or revoke a token

Click a token card to open it, change the Access token and click SUBMIT. The old value stops working at once, and the app gets 401 Unauthorized until you give it the new value.

Use this to revoke a token: give it a new random value that you do not hand out.

Good to know

  • Keep tokens out of public code, such as JavaScript that runs in the browser. Send email from your server.
  • After six requests with a wrong token, OpenMail blocks the address that sent them for up to 15 minutes, even with a valid token. See Errors.
Made in Europe