Platform

Platform overview How it works Authorization testing Evidence & reports Private scanning Integrations

Solutions

Security agencies Product teams Regulated industries Partner programme

Learn

Blog Knowledge hub Compare

Resources

Pricing Documentation Help centre FAQ Security & data What we haven’t proved

Company

About Contact Careers Sign in to the platform Start a $199 pilot →

Home / Knowledge hub / API authentication

Knowledge hub

API authentication

How an API decides which caller is making a request before it does anything.

Illustration explaining API authentication

What it means

API authentication is how an API establishes who is calling before it acts. Each request carries something that proves identity: an API key, a bearer token, a signed JWT, a client certificate. The server checks it, and only then does the work. A request that fails the check should be refused before any data is read.

It answers one question, who is this? It does not say what the caller may do. That is authorisation, and mixing the two up is the source of many API flaws. An API that checks the first but forgets the second will happily serve any caller anything.

Why it matters

APIs are the part of your product that other software, including attackers' software, can call at scale. If authentication is weak or missing on one endpoint, there is no web page in the way and no person to notice. Data can be pulled out quietly in volume, and the first sign may be a bill or a customer email.

Authentication failures sit near the top of every API risk list. OWASP's API Security Top 10 ranks broken authentication second, behind only broken object-level authorisation. Customers also ask how your API authenticates, and a vague answer costs deals. A clear one shortens the review.

How it shows up

Typical methods are API keys, OAuth 2.0 access tokens, JWTs and mutual TLS between services. Choose by who the callers are: people through an app, other servers, or partners. Each method has its own mistakes, such as tokens that never expire or signatures that are not checked.

Review every endpoint, not just the documented ones: old versions, internal routes and debug paths often skip the check. Confirm that failed authentication returns the same response whatever the cause, that credentials are never sent in URLs, and that rate limiting protects the sign-in and token routes.

Questions people ask

API authentication, answered

What is the difference between authentication and authorisation in an API?

Authentication identifies the caller. Authorisation decides what that caller may access or change.

A valid token proves who is calling, but it does not mean they may read every record they ask for.

Which method should an API use?

For user-facing apps, OAuth 2.0 or OpenID Connect with short-lived access tokens is the usual choice. For server-to-server calls, mutual TLS or signed requests work well.

API keys suit simple, low-risk cases.

Is basic authentication acceptable?

Only over HTTPS and for low-risk, internal cases. It sends the credentials with every request, which increases the chances of leaking them, and offers no expiry or scopes.

Tokens are generally a better choice.

How should failed authentication be handled?

Return a 401 status, with the same message whatever the reason, so the response does not reveal which accounts exist. Limit repeated failures and log them.

Do not return details of what was wrong with the credential.

How do we test API authentication?

Call each endpoint without credentials, with expired ones, with another environment's, and with a tampered token. Include old versions and undocumented routes.

Anything that answers when it should refuse is a finding.

Cyberlop mark

Which endpoints answer without proof?

We test your APIs for endpoints that respond without proper authentication and for cross-account access once a caller is signed in. Each finding has the request and response. Ask us to run it on one of your applications.

Or start with a $199 pilot on one application: thirty days, success criteria agreed before day one, credited against the annual if you convert.