API Key

Chaos requires an API key from the ProjectDiscovery Cloud Platform for authentication. Whether you are using the client (CLI), the API, or integrating it as a library, an API key is mandatory for access.

Authenticate CLI

You can add the API key to your environment variables, like so:

export PDCP_API_KEY=XXXXXX

Or you can directly inject the API key as an environment variable to the process like so:

PDCP_API_KEY=XXXXXX chaos -d uber.com -silent

Or you can pass the API key as a flag while using the client like so:

chaos -d uber.com -silent -key XXXXXX

Authenticate REST API

While using the API, you need to pass the API key in the Authorization header like so:

GET /dns/uber.com
Host: dns.projectdiscovery.io
Authorization: API_KEY
Connection: close

Authenticate with Library

You can add the API key to your environment variables, like so:

export PDCP_API_KEY=XXXXXX

Then you can access the API key in your code like so:

os.Getenv("PDCP_API_KEY")