Skip to main content

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.
Keep your API key secure. Don’t commit it to version control or share it publicly.

Using Your API Key

Set your API key as an environment variable:
export CYBERWAVE_API_KEY="your_api_key_here"
The SDK automatically reads this variable:
import cyberwave as cw

# Automatically uses CYBERWAVE_API_KEY
robot = cw.twin("the-robot-studio/so101")

Direct Configuration

Pass the API key directly when initializing the client:
from cyberwave import Cyberwave

client = Cyberwave(api_key="your_api_key_here")

Using Tokens

For short-lived sessions, you can use tokens instead of API keys:
from cyberwave import Cyberwave

# Token-based authentication
client = Cyberwave(token="your_bearer_token")

Environment Variables

The SDK supports these environment variables:
VariableDescription
CYBERWAVE_API_KEYYour API key for authentication
CYBERWAVE_TOKENBearer token (alternative to API key)
CYBERWAVE_BASE_URLAPI base URL (default: https://api.cyberwave.com)
CYBERWAVE_ENVIRONMENT_IDDefault environment ID
CYBERWAVE_WORKSPACE_IDDefault workspace ID

Example .env File

CYBERWAVE_API_KEY=cw_live_xxxxxxxxxxxxxxxxxxxx
CYBERWAVE_ENVIRONMENT_ID=env_xxxxxxxxxxxxxxxxxxxx
Load with python-dotenv:
from dotenv import load_dotenv
load_dotenv()

import cyberwave as cw
robot = cw.twin("the-robot-studio/so101")

MQTT Authentication

For real-time features (video streaming, live updates), the SDK connects to MQTT automatically using your API credentials.
from cyberwave import Cyberwave

client = Cyberwave(api_key="your_api_key")

# MQTT connection uses the same credentials
robot = client.twin("the-robot-studio/so101")
robot.subscribe_joints(lambda data: print(f"Joints: {data}"))

Custom MQTT Settings

Override MQTT connection settings if needed:
client = Cyberwave(
    api_key="your_api_key",
    mqtt_host="mqtt.cyberwave.com",
    mqtt_port=1883
)

REST API Authentication

For direct REST API calls, include your API key in the Authorization header:
curl -X GET "https://api.cyberwave.com/api/assets/" \
  -H "Authorization: Bearer your_api_key_here"

Troubleshooting

  • 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
The SDK couldn’t find credentials. Either:
  • Set the CYBERWAVE_API_KEY environment variable
  • Pass api_key directly to Cyberwave()
  • 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

Next Steps