Skip to main content
The native WebSocket API needs the key on the query string, since browsers can’t set custom headers on a WebSocket upgrade request.
Anything shipped to a browser exposes your API key to whoever opens DevTools. Use browser connections for internal dashboards and demos; for public-facing products, proxy the stream through your backend instead.

Python

The same client using websockets

Node.js

The same client using ws

Go

The same client using gorilla/websocket

Next: Best Practices

A checklist of practical tips gathered from across this reference.