API security testing checks whether a service exposes data or actions to callers who should not have them. Start with documented roles, test identities, and disposable records in a local or staging environment. The checklist below turns common API risks into bounded manual checks; it is not permission to probe systems you do not own.
Inspect an authorized API request and responseSet up safe API security tests
Before sending a security test, define the scope with the API owner. Use local or staging endpoints, synthetic data, two test accounts with known roles, and credentials that can be revoked. Avoid production writes, high-volume requests, real customer data, and tests that call external systems. Record the endpoint, role, expected result, and cleanup step before each test.
- Step 1
Scope
Use an API and environments you are authorized to test.
- Step 2
Fixture
Create synthetic records and least-privilege test accounts.
- Step 3
Request
Change one variable at a time and keep the request bounded.
- Step 4
Evidence
Review status, headers, body, and server-side logs.
12 API security risks every developer should check
These checks align with recurring API security failure patterns such as broken object and function authorization, broken authentication, unrestricted resource consumption, security misconfiguration, and unsafe input handling. OWASP’s API Security Top 10 is a useful companion reference, but a checklist cannot replace a threat model for your application.
1. Broken Object Level Authorization (BOLA)
Use two test accounts and objects created for those accounts. Request an object owned by the current test identity, then request a fixture owned by the second test identity. The API should enforce ownership on every read, update, and delete operation; changing an ID in a URL must not grant access.
2. Broken authentication
Check missing, malformed, expired, and revoked test credentials. Confirm that protected routes reject them, token validation checks the expected issuer and audience, and errors do not reveal token contents or secrets.
3. Broken Function Level Authorization
Compare what test roles can do on the same route. A regular user should not gain an administrator action simply by changing a URL, HTTP method, or request field. Check authorization on the server for each function.
4. Object property authorization and excess fields
Inspect responses for properties the test role should not see. Try a documented update with an unexpected privileged field in a disposable fixture and confirm the server accepts only allowed properties. OWASP groups excessive data exposure and mass assignment under broken object property level authorization in its 2023 API risks.
5. Unrestricted resource consumption
Review pagination caps, payload size limits, expensive filters, and rate-limit behavior. Use a low-volume test agreed with the API owner; a manual API client is not a load-testing or denial-of-service tool.
6. SQL injection
On a local or staging instance with synthetic data, check that search and filter inputs are handled as values rather than SQL syntax. Use your approved test cases and verify parameterized queries server-side. Do not send destructive payloads to production.
7. NoSQL injection
Check that JSON filters and login inputs cannot supply query operators or unexpected object types. The server should validate types and build database queries using safe driver APIs, not trust a client-provided query structure.
8. Input validation and content types
Send boundary values, missing fields, wrong primitive types, oversized strings, and unsupported content types to controlled test routes. The API should reject invalid data clearly and avoid accepting fields outside its contract.
9. Sensitive response and error data
Review successful and rejected responses for passwords, full payment data, internal stack traces, private identifiers, or debug configuration. Error messages should help a legitimate client without disclosing secrets or implementation details.
10. CORS and security configuration
Check that browser origins, methods, and headers are limited to the intended policy. CORS controls whether browsers expose a cross-origin response; it is not authentication and does not stop scripts or other clients from calling a public endpoint.
11. Insecure transport and missing TLS
Confirm remote APIs use HTTPS, credentials are not sent over plain HTTP, and redirects do not downgrade a secure request. Check that TLS certificates are validated by the client and that secure cookie attributes are used where relevant.
12. Server-Side Request Forgery (SSRF)
For endpoints that fetch a user-supplied URL, test only controlled hostnames in an isolated environment. Verify the server restricts destinations and blocks access to internal services and cloud metadata; never point a production API at arbitrary addresses as an experiment.
A safe object authorization test
Suppose your staging API contains two invoices created for two test users. First sign in as the owner of fixture invoice-test-a and request it. Then keep that same test identity and request the second test fixture, invoice-test-b. The second request should return the API’s documented denial behavior and no protected fields. This checks that the server authorizes the object, not just that the caller can reach the route.
# The token and fixture identifiers below are placeholders.
curl -i https://staging.example.test/v1/invoices/invoice-test-a \
-H "Authorization: Bearer TEST_USER_A_ACCESS_TOKEN"
# Keep the same test identity; request a fixture owned by test user B.
curl -i https://staging.example.test/v1/invoices/invoice-test-b \
-H "Authorization: Bearer TEST_USER_A_ACCESS_TOKEN"A denied response is useful only if it contains no sensitive data and the server logs show the authorization check ran. Repeat this pattern for update and delete routes using resettable test records. Do not substitute real identifiers or try the same request against another organization’s service.
Inspect the status, response headers, and body
A 401 often indicates credentials were absent or rejected; a 403 often indicates the authenticated caller lacks permission. Some services return 404 to conceal a protected resource. In each case, check that the response does not expose an object, private field, stack trace, or token. Review headers for content type, cache policy, CORS behavior, and secure transport-related settings that matter to the endpoint.
JsonifyTools API Tester can send authorized requests and show the response status, headers, timing, size, and body. It does not automatically scan for vulnerabilities or prove an endpoint is secure. For the JSON response itself, use the JSON Viewer; use the JWT Decoder only to inspect visible test-token claims, not to verify the API’s signature checks.
API security testing checklist before release
- Map the endpoints, versions, roles, and data each route handles.
- Test access with missing, invalid, expired, and least-privilege credentials.
- Check ownership for every object identifier and permission for every sensitive action.
- Review exposed fields, input validation, error responses, and limits.
- Confirm TLS, CORS, and other security settings match the application’s threat model.
- Run injection, rate-limit, and SSRF checks only in an approved isolated environment.
- Capture sanitized evidence, fix the server-side control, and repeat the same test.
- Convert stable expectations into automated authorization and contract tests.
For the current named risk categories, read the OWASP API Security Top 10 (2023). In particular, its API3 category combines excessive data exposure and mass assignment under broken object property level authorization. Match the reference to the version your organization uses and update your checklist as its threat model changes.
Continue your workflow
Related developer tools
Use these tools to build a request, inspect its data, and understand authentication responses.