Using API Keys
API keys let servers, scripts, or jobs receive webhook traffic over WebSocket without relying on the browser dashboard.
Create a key in the web app
- Sign in at hooknexus.com.
- Open Settings → API Keys (or the equivalent in the current UI).
- Click New Key (or similar).
- Enter a name if prompted.
- Copy the full key once — it is only shown at creation time. If you lose it, revoke the key and create another.
To revoke a key, use the same Settings screen — revoked keys stop working immediately and open WebSockets will disconnect.
Connect with WebSocket
wss://api.hooknexus.com/ws/{endpoint-id}?apikey={your-api-key}Full details and message formats are in the WebSocket API reference.
const WebSocket = require('ws');
const ws = new WebSocket( `wss://api.hooknexus.com/ws/${ENDPOINT_ID}?apikey=${API_KEY}`);
ws.on('message', (data) => { const msg = JSON.parse(data.toString()); if (msg.type === 'new_request') { console.log(msg.payload); }});import asyncio, json, websockets
async def listen(): url = f"wss://api.hooknexus.com/ws/{ENDPOINT_ID}?apikey={API_KEY}" async with websockets.connect(url) as ws: async for msg in ws: data = json.loads(msg) if data.get("type") == "new_request": print(data.get("payload"))
asyncio.run(listen())Typical limits (check the app)
| Plan | API keys | WebSocket connections per endpoint |
|---|---|---|
| Free | — | 1 (dashboard) |
| Plus | 1 | 3 |
Exact numbers are enforced for your account — see Pricing.
Security
- Environment variables — e.g.
export HOOKNEXUS_API_KEY="...". - One key per use case — easier to revoke if one script leaks.
- Server-side only — never put keys in frontend bundles.
- Rotate — revoke and recreate if you suspect exposure.