Home / Help centre / Integrations & API
Integrations & API
How do I authenticate requests to the Cyberlop API?
Send your personal API token in an Authorization header as a Bearer token on every request. The API also accepts a session cookie. Each route then checks that your token's owner holds the permission it lists.
Steps
- Get a personal API token from an admin. See how to get a personal API token.
- Add the header
Authorization: Bearer YOUR_TOKENto each request. - Test with
GET /api/auth/me. It returns the current authenticated principal. In plain words, it tells you which user the API thinks is calling, which is a quick way to prove the token works before you try anything bigger. - Open the API Reference page and find the endpoint you want. The chip on the right shows the permission it needs.
- When a call fails, compare that permission with your role.
Good to know
The reference says to authenticate with a session cookie or a Bearer API token. Scripts and CI jobs should use the token. A cookie comes from a browser session that signs in through the login route, and that route slows down repeated wrong guesses.
| Route type | How you authenticate |
|---|---|
| Most routes | Bearer API token or session cookie, plus the listed permission |
| Login and refresh | Public, or the refresh cookie |
GET /health | Public |
The token carries its owner's permissions and group scope, so a narrow role makes a safer token. If you can, make a dedicated user for automation and give that user only the permissions the job needs. Never put a token in client-side code. Keep it out of public repositories too.
Not sure which permission a call needs? Read how to find the endpoint and its permission. If a call returns a permission error, see why the API refuses a call.
Related questions
- How do I get a personal API token?
- How do I find the endpoint I need and the permission it requires?
- Why does my API call return a permission error?
- How do I launch a scan through the API?
- How do I download the API spec?
Cyberlop API reference: authentication, permissions and the OpenAPI spec
Step-by-step, with annotated screenshots.
Updated · Back to the help centre
Wiring it into your pipeline?
Share what you are building and we will help you set up the right token, profile and job.