Secure API access with multiple authentication methods
Best for:
Server-to-server communication
Long-lived credentials for backend services and automation
Pros:
Cons:
Best for:
User-facing applications
Delegated authorization for third-party applications
Pros:
Cons:
Best for:
Session-based authentication
Stateless authentication with embedded claims
Pros:
Cons:
Generate and manage API keys for server-to-server authentication
curl -X POST https://api.wave.inc/v1/auth/keys \
-H "Authorization: Bearer <session-token>" \
-H "Content-Type: application/json" \
-d '{
"name": "Production API Key",
"scopes": ["streams:read", "streams:write", "analytics:read"],
"expires_in_days": 90
}'
# Response: 201 Created
{
"id": "key_abc123xyz",
"key": "wave_live_sk_xxxxxxxxxxxxxxxxxxxxxxxxxx",
"name": "Production API Key",
"scopes": ["streams:read", "streams:write", "analytics:read"],
"expires_at": "2026-02-14T00:00:00Z",
"created_at": "2025-11-14T00:00:00Z"
}
# ⚠️ CRITICAL: Save the "key" value immediately!
# It's shown only once and cannot be retrieved later.Granular access control with scope-based permissions
*Full access to all resources (admin only)
streams:readList and view stream details
streams:writeCreate, update, and delete streams
analytics:readAccess analytics and viewer data
recordings:readList and download recordings
recordings:writeDelete recordings
webhooks:readList webhook configurations
webhooks:writeCreate and manage webhooks
users:readList team members
users:writeInvite and manage team members
billing:readView billing and usage data
billing:writeUpdate subscription and payment methods
analytics:read instead of *.Authorization for user-facing applications
Step 1: Redirect to Authorization
https://auth.wave.inc/oauth/authorize? client_id=your_client_id& redirect_uri=https://yourapp.com/callback& response_type=code& scope=streams:read streams:write analytics:read& state=random_state_string
Step 2: Exchange Code for Token
curl -X POST https://auth.wave.inc/oauth/token \
-d 'grant_type=authorization_code' \
-d 'code=auth_code_from_callback' \
-d 'client_id=your_client_id' \
-d 'client_secret=your_client_secret' \
-d 'redirect_uri=https://yourapp.com/callback'
# Response
{
"access_token": "wave_oauth_access_xxxxx",
"refresh_token": "wave_oauth_refresh_xxxxx",
"expires_in": 3600,
"token_type": "Bearer",
"scope": "streams:read streams:write analytics:read"
}Step 3: Refresh Access Token
curl -X POST https://auth.wave.inc/oauth/token \ -d 'grant_type=refresh_token' \ -d 'refresh_token=wave_oauth_refresh_xxxxx' \ -d 'client_id=your_client_id' \ -d 'client_secret=your_client_secret'