Authentication

Overview

All requests to the Bugcrowd Hacker API must be authenticated with an API token sent in the Authorization header.

Creating an API Token

You need a verified identity to create or edit API tokens. If your identity is not verified, the API Credentials page shows an Identity verification required message and the Generate new token button is disabled. Verify your identity to continue. Tokens you created earlier stay visible and can be deleted, but they can’t be edited until your identity is verified.

  1. Sign in to Bugcrowd and select API Credentials from the top navigation (https://bugcrowd.com/settings/api_credentials).

    Select API Credentials in the top navigation

  2. Click Generate new token.

    Click Generate new token

  3. Give the token a name that describes its purpose.
  4. Choose an expiration: No expiration, 30 days, 60 days, 90 days, or Custom to pick a date.
  5. Select the permissions the token needs (see Scopes), then click Generate token.

    Name the token, set an expiration, and select permissions

  6. Copy the generated Authorization header value and store it somewhere safe. The token’s secret is shown only once, when the token is created.

You can rename a token, change its scopes, or revoke it from the same page. Renaming and changing scopes require a verified identity; revoking does not.

The API Credentials page is only available to accounts that have access to the Hacker API.

Token Format

When you generate a token, the API Credentials page shows it once, as a single value that already starts with the word Token, for example:

Token AbC123dEf456:xYz789gHi012jKl345

Send that value exactly as copied as the Authorization header. You don’t need your Bugcrowd username or password, and you don’t need to add or remove anything:

Authorization: Token AbC123dEf456:xYz789gHi012jKl345

Example Request

Store the copied token in an environment variable, then reference it in your requests:

export HACKER_API_TOKEN='Token AbC123dEf456:xYz789gHi012jKl345'

curl --include \
     --header "Accept: application/json" \
     --header "Authorization: $HACKER_API_TOKEN" \
  'https://hacker-api.bugcrowd.com/v1/engagements'

Scopes

Each token is granted one or more scopes. An endpoint returns 403 insufficient_scope if the token does not have the scope it needs.

Scope Grants access to
read:engagement_list GET /v1/engagements, GET /v1/engagements/{id}, GET /v1/engagements/{id}/scope
read:submissions GET /v1/submissions, GET /v1/submissions/{id}
write:draft_submissions POST /v1/submissions (create submission drafts)

The write:draft_submissions scope is under development and will be available soon.

Error Responses

Authentication and access errors are returned in the standard error format. The code field tells you what went wrong:

Status Code Meaning
401 invalid_token The Authorization header is missing or malformed, or the credentials are wrong
401 token_revoked The token has been revoked
401 token_expired The token has passed its expiry date
403 hacker_api_disabled The Hacker API is not available for your account
403 forbidden The Hacker API is not available
403 user_banned Your account has a platform-level ban
403 identity_not_verified Your account needs a verified identity to use the API
403 insufficient_scope The token does not have the scope required by this endpoint
403 submissions_not_accepted The engagement is not accepting submissions
403 draft_submission_required Submissions can only be created as drafts, so draft must be true

Token Expiry and Inactivity (Coming Soon)

Bugcrowd emails you before a token stops working, so you have time to act:

  • Expiring soon: one week before a token’s expiry date, we email you so you can create a new token. Creating a new token requires a verified identity.
  • Unused tokens: a token that has not been used for one year is revoked automatically. One week before that, we email you the date it will be revoked. Making any authenticated API request with the token keeps it active.
  • Revoked for inactivity: when a token is revoked, we email you the details. Create a new token on the API Credentials page if you still need access.

Tokens that never expire are still revoked after one year without use.

Security Best Practices

  • Keep your API tokens secure and never commit them to version control
  • Set an expiry date on tokens and rotate them regularly
  • Revoke tokens you no longer use
  • Use environment variables or secure configuration management to store your credentials
  • Grant each token only the scopes it needs