Skip to content

API access tokens

Every public API call is signed in with an API access token. An administrator generates the token on a user’s profile, and the integration then acts as that user. This page shows you how to generate a token, how long it lasts, and how to replace it.

  • Complete edition. The API Access Token section only appears when your edition includes the public API.
  • Permission to edit users. You generate tokens from a user’s profile, so you need access to Users → User. See Managing users.
  • The user must have accepted their invitation. You can’t generate a token for a user who is still pending.
  • You can’t hand out more access than you have. You can only generate a token for a user whose rights don’t exceed your own.
  1. Open Users → User and click the name of the user the integration will act as.
  2. Scroll to the API Access Token section and tick Make user an API user to generate an access token.
  3. Pick the API Token Expiration Date (and time) with the calendar. The token stops working after this date.
  4. Click Generate Token.
  5. The token appears in the API Access Token box and is downloaded to your computer as a file. Store it somewhere secure, such as your organization’s password manager or secrets vault.

Generate a new token the same way. If the user already has a valid token, Wasp Asset tells you when the last one was issued and asks you to confirm. Click Generate Token to continue.

Generating a new token permanently disables every earlier token for that user, so update your integration with the new token straight away. Rotate the token:

  • Before the expiration date you chose, so your integration doesn’t stop unexpectedly.
  • Immediately, if you think the token has been exposed (for example, pasted in an email or committed to source control).
  • The expiration date passes. Generate a new token with a later date.
  • A newer token is generated for the same user. Only the latest token works.
  • The user is disabled. Disabling the user disables their token too, and every API call fails until the user is enabled again.
  • The user’s role changes. Calls are checked against the user’s current role, so removing permissions can make calls that used to work start failing. Keep integration users in an administrator role and leave it unchanged.

Send the token in the Authorization header of every request, after the word Bearer and a single space:

Authorization: Bearer <your token>

See the Public API overview for the other headers every request needs, or Try the API with Postman to test the token.