Spanish Total.js
English
Documentation For AI agents
Contents

API tokens

Create a token for each app that sends logs, copy it, and change it.

.md GitHub
On this page

Your apps send logs 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 project and Demo shop

Create a token

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

2. Enter a Name, for example Demo shop.

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

4. Click SUBMIT.

The Create token form with Name and Access token

The option Allow read list of profiles has no effect in OpenLogger. You can leave it as it is.

Copy the token for your app

Click the cog of a token and choose Copy URL address. OpenLogger copies the address that your app sends logs to, with the token in it, for example https://logs.example.com/?token=YOUR_TOKEN.

You can use this address as it is, or take the token from it and send it in the x-token header. See REST API overview.

What a token can do

A token can only send logs. It cannot read logs and gives no access to the admin interface. Use the primary access token to read logs from a script.

Change or revoke a token

1. Click the token card, or click its cog and choose Edit. The Update token form opens.

2. Change 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 code that runs in the browser. Send logs from your server.
  • After six requests with a wrong token, OpenLogger blocks the address that sent them for up to 15 minutes, even with a valid token. See Errors.
Made in Europe