Account
API Keys
Manage API keys for programmatic access
API Keys
Create and manage API keys for programmatic access to DCP.
Creating API Keys
Via Web Interface
- Navigate to Account Settings
- Go to "API Keys" section
- Click "Create API Key"
- Enter key name and description
- Set permissions/scopes
- Copy and save the key securely
Key Security
Important: API keys are only shown once. Store them securely.
- Never commit keys to version control
- Use environment variables
- Rotate keys regularly
- Use least privilege principle
Using API Keys
In Environment Variables
export DCP_API_KEY=your-api-key-here
In API Requests
curl -H "Authorization: Bearer YOUR_API_KEY" \
https://api.dcp.com/v1/...
In CLI
dcp config set api-key YOUR_API_KEY
Managing API Keys
View Keys
List all your API keys:
- Go to API Keys section
- View key list with:
- Key name
- Created date
- Last used
- Status
Revoke Keys
Revoke compromised or unused keys:
- Select the key
- Click "Revoke"
- Confirm action
Regenerate Keys
Regenerate existing keys:
- Select the key
- Click "Regenerate"
- Update applications with new key
Best Practices
- Use separate keys for different applications
- Set appropriate scopes/permissions
- Regularly rotate keys
- Monitor key usage
- Revoke unused keys