Skip to main content
No Result Found
Get your setup working faster. Join our Discord for optimisation tips from elite testers. Join our DiscordJoin our Discord

Authentication

Load Testing API uses HTTP Basic Auth for authentication with your BrowserStack credentials.

You need to pass your BrowserStack account credentials in each request.

HTTP Basic Auth

All Load Testing API endpoints require HTTP Basic Auth. Pass your username and Access Key as BROWSERSTACK_USERNAME:BROWSERSTACK_ACCESS_KEY in the Authorization header:

curl -u $BROWSERSTACK_USERNAME:$BROWSERSTACK_ACCESS_KEY \
  https://load-api.browserstack.com/api/v1/runs/{run_id}/status

Get your credentials

You can view and manage your Load Testing credentials from the Load Testing Dashboard:

  1. Log in to your Load Testing dashboard.
  2. Click Settings.
  3. Under API Access, find:
    • Username: your Load Testing username
    • Access Key: your unique API access key

Keep your Access Key confidential. If exposed, regenerate it immediately from the Settings page.

Any valid Access Key in your group can trigger, stop, and read results for any run in that group. There are no separate read-only or read-write credentials in v1. Handle credentials accordingly when sharing with CI/CD systems or teammates.

Example request with credentials

curl -u "your_username:your_access_key" -X POST \
  https://load-api.browserstack.com/api/v1/runs \
  -H "Content-Type: application/json" \
  -d '{
    "project_name": "my-project",
    "test_name": "checkout-flow"
  }'

Environment variables

For security, store your credentials as environment variables:

export BROWSERSTACK_USERNAME="your_username"
export BROWSERSTACK_ACCESS_KEY="your_access_key"

curl -u $BROWSERSTACK_USERNAME:$BROWSERSTACK_ACCESS_KEY \
  https://load-api.browserstack.com/api/v1/runs/{run_id}/status

Troubleshooting

Error Likely cause Fix
401 Unauthorized Credentials are invalid or missing Verify your username and Access Key in the Settings page
403 Forbidden Account doesn’t have API access enabled Contact support to enable the Load Testing public API for your account

We're sorry to hear that. Please share your feedback so we can do better

Contact our Support team for immediate help while we work on improving our docs.

We're continuously improving our docs. We'd love to know what you liked





Thank you for your valuable feedback

Download Copy Check Circle