Home / Help centre / Authentication & logins
Authentication & logins
How do I send a Bearer token in the Authorization header?
On the role, tick Header (token / API key), click + Add header, type Authorization as the name and Bearer followed by a space and your token as the value, then click Save. For tokens that expire quickly, OAuth 2.0 client credentials suit better.
Steps
- Open the role and tick Header (token / API key) under Authentication methods.
- Click + Add header to add a row.
- Type
Authorizationin the name box. - In the value box, type
Bearer, a space, and then your token. The placeholder readsBearer ...to show the shape. - Press Save.
Good to know
A Bearer token goes in as one header. The word Bearer and the space after it are part of the value. Leave out the space and many APIs refuse the request.
| Box | Example |
|---|---|
| Name | Authorization |
| Value | Bearer followed by a space and your token |
A token stored in a header stays exactly as you typed it. When your tokens expire quickly, use OAuth 2.0 client credentials instead, since Cyberlop then mints a fresh token when the scan runs.
You can also add AI guidance on the same role to explain the token, for example that it belongs to an admin. See how to add AI guidance.
Do not reuse a token from a real person's session. Make a new one for the scan, give it the access the test needs and nothing more, and delete it when the work ends. That keeps the blast radius small if the token ever leaks.
Create the token for this job and keep its reach small. Only test apps you have permission to test.
Related questions
- How do I authenticate the scanner with an API key header?
- How do I set up OAuth 2.0 client credentials for a role?
- How do I remove a header from a role?
- How do I give the scanner AI guidance on how to use a credential?
- My API rejects the OAuth token part-way through a scan. How do I tell the scanner to get a fresh one?
How to add header token authentication to a scan profile
Step-by-step, with annotated screenshots.
Updated · Back to the help centre
Still stuck?
Tell us what you see on screen and an engineer will help you sort it out.