Authentication

Authenticate API requests with a bearer token, and how that differs from the in-app guest path.

Applies To

Every liveworkspace app

External API calls authenticate with an API token: a long-lived, revocable credential that acts as your account.

Get a token

Tokens have the form lwt_ followed by a random string, so they are easy to spot in logs and secret scanners.

Send the token

Pass the token in the Authorization header as a bearer credential on every request. There is no separate login or session step.

Check or retire the token you are using

GET /tokens/current describes the token the request presented: its account, name, whether it is read-only, and when it expires. It is a cheap way for a script to confirm its credential works. DELETE /tokens/current revokes that same token, so a script can clean up after itself without you opening Settings.

You need an account

Tokens versus the guest path

Keep tokens safe

A token has your account's full read and write access to your knowledgebases. Treat it like a password: keep it out of source control and shared logs, and never put it in client-side code that ships to a browser. If a token might have leaked, revoke it in Settings, Developers, API Tokens and create a replacement.

Errors

How this works in 5 other apps

Was this article helpful?

Still need help?

Try Troubleshooting, or tell us what you were trying to do.

Contact us