Generate a CloudQuery API Key
In automated environments, an API Key can be used with CloudQuery Hub and premium integrations instead of cloudquery login.
Create an API key by following these steps:
- Go to CloudQuery Platform and log in or register for a new account.
- If you are not already in a team, you will be prompted to create a new team.
- Once you are logged in, click
Team Settingsin the left sidebar. - Go to the
API Keystab.
- Click
Generate new key
- Choose a key name for you to identify this key by, select the scope of the key and an expiration date. Then click
Generate new key.
If you intend to use the key to only run syncs we recommend selecting Syncs operations only as the scope. If you intend to use the key to interact with the CloudQuery REST API, select Read and write as the scope.
- Copy the key and store it in a safe place. You will not be able to see it again after this step.

To use the API key with the CloudQuery CLI, set the CLOUDQUERY_API_KEY environment variable to the value of the key.
export CLOUDQUERY_API_KEY=<your-api-key>Next Steps
- Deployment Options - Choose a deployment strategy for your syncs
- Docker Deployment - Use your API key in Docker containers
- GitHub Actions - Use your API key in CI/CD pipelines
Last updated on