Configuration
Configure authentication, scheduling, and rate limiting for API Scanning.
Authentication
Configuring authentication is essential for testing protected endpoints. Without working API calls, the scanner can only look for shallow security issues and you don’t get full coverage, so make sure the details you provide are valid and up to date.
Supported Authentication Methods
| Method | How to configure |
|---|---|
| None | Choose this if your API endpoints don’t require authentication. |
| API Key | Choose where the key is sent under Type (Header, Query or Cookie), then enter its name under Key (for example, X-API-Key) and the key under Value. |
| OAuth / Client Credentials | For the OAuth 2.0 Client Credentials grant. Enter the Access token URL, Client ID and Client secret, and optionally Scopes and custom fields. The scanner uses these to request an access token automatically and includes it in all scan requests. |
| OAuth / Authorization Code | For the OAuth 2.0 Authorization Code grant. Enter the Client ID, Client secret, Authorization URL and Access token URL, and optionally a Refresh token URL, Scopes and custom fields. Then click Authorize, log in at your provider and approve the connection. |
For OAuth / Authorization Code, the read-only Redirect URI is https://app.detectify.com/oauth/2_0/callback. Add this exact URL to the allowlist in your OAuth application settings at your identity provider.
Use custom fields for provider-specific parameters, such as an audience field for Auth0.
Authentication Tips
- Use credentials with sufficient permissions to access all endpoints you want tested. Keep in mind that credentials with rights to create data might mean that the scanner does so when fuzzing the API. If a POST endpoint is tested, data may be created in your systems, and API Scanning doesn’t remove it.
- If your API uses short-lived tokens, configure OAuth 2.0 so the scanner can request new tokens automatically. A token entered as an API key isn’t renewed when it expires.
- Use Test operation in the Operations step to check that your credentials produce working API calls.
GraphQL Endpoint
For GraphQL APIs, choose the Domain to scan and enter the full Server URL of your GraphQL endpoint, including subdomain and path if required.
Scheduling
You can run API scans on demand or schedule them to run automatically.
On-Demand Scans
Click Scan once on the API Scanning page to run an immediate scan. This is useful for one-time assessments or testing after a specific deployment.
Scheduled Scans
When you create a scan profile, Scan every 3 days (Starting now) is on by default, and the first scan starts as soon as you save the profile. To change it later, open Profile settings from the Actions column on the API Scanning page.
Scheduled scans run automatically every 3 days and benefit from payload rotation, where each run tests different payload variations, expanding coverage over time.
Rate Limiting
Rate limiting controls how many requests per second the scanner sends to your API. You configure the Rate Limit when creating a scan profile or by editing an existing profile. The options are Unlimited (recommended), which is the default, and 5, 30, 50, 100, 200 or 300.
Setting the rate limit too low extends scan duration.
Scan Duration
Scan duration depends on several factors:
| Factor | Impact |
|---|---|
| Number of endpoints | More endpoints means more payloads to send |
| Rate limiting | Lower limits extend scan time |
Typical scans complete in around 15 to 20 minutes, if not faster. Large APIs with hundreds of endpoints and strict rate limits take longer.
Scan Scope
You choose which operations in your API definition to include in the scan. You can:
- Leave out specific operations, such as highly sensitive endpoints
- Use Quick select to pick All operations or every operation with a given HTTP method (REST), or select specific queries and mutations (GraphQL)
Editing a Scan Profile
Open Profile settings from the Actions column to change a scan profile. You can change every setting except the server address. To scan a different server address, create a new scan profile.
Custom Headers
You can add custom headers that are included in all API requests for a scan profile, in the Custom headers step when you create the profile or later in its settings.