Overview
Cyberwave uses API keys or tokens to authenticate requests. You’ll need credentials to:- Connect the Python SDK
- Make REST API calls
- Establish MQTT connections
Getting Your API Key
1
Sign in to Cyberwave
Go to cyberwave.com and sign in to your account.
2
Navigate to Profile
Click your profile icon and select Profile or go directly to cyberwave.com/profile.
3
Generate API Key
In the API Keys section, click Generate New Key. Copy the key immediately—it won’t be shown again.
Using Your API Key
Environment Variable (Recommended)
Set your API key as an environment variable:Direct Configuration
Pass the API key directly when initializing the client:Using Tokens
For short-lived sessions, you can use tokens instead of API keys:Environment Variables
The SDK supports these environment variables:| Variable | Description |
|---|---|
CYBERWAVE_API_KEY | Your API key for authentication |
CYBERWAVE_TOKEN | Bearer token (alternative to API key) |
CYBERWAVE_BASE_URL | API base URL (default: https://api.cyberwave.com) |
CYBERWAVE_ENVIRONMENT_ID | Default environment ID |
CYBERWAVE_WORKSPACE_ID | Default workspace ID |
Example .env File
MQTT Authentication
For real-time features (video streaming, live updates), the SDK connects to MQTT automatically using your API credentials.Custom MQTT Settings
Override MQTT connection settings if needed:REST API Authentication
For direct REST API calls, include your API key in theAuthorization header:
Troubleshooting
Authentication failed: Invalid or missing credentials
Authentication failed: Invalid or missing credentials
- Verify your API key is correct
- Check that the environment variable is set:
echo $CYBERWAVE_API_KEY - Ensure the key hasn’t expired—generate a new one if needed
No CYBERWAVE_API_KEY found
No CYBERWAVE_API_KEY found
The SDK couldn’t find credentials. Either:
- Set the
CYBERWAVE_API_KEYenvironment variable - Pass
api_keydirectly toCyberwave()
MQTT connection failed
MQTT connection failed
- Check your network allows outbound connections on port 1883
- Verify your API key has MQTT permissions
- Try reconnecting:
client.mqtt.connect()
Security Best Practices
Use Environment Variables
Never hardcode API keys in your source code
Rotate Keys Regularly
Generate new keys periodically and revoke old ones
Limit Permissions
Use workspace-scoped keys when possible
Audit Access
Monitor API usage in your dashboard