Documentation

Vask is a drop-in replacement for Pusher. Get started in minutes with your existing Pusher setup or explore our integration guides.

#Quick Start

  1. Create an account - Sign up in the dashboard, import Pusher credentials, or let the agent skill register an app with your GitHub-published SSH key.
  2. Configure your application - Use your Vask credentials with any Pusher SDK.
  3. Send messages - Start broadcasting real-time events to your users.

#Integration Guides

  • Setup with agent - Install vask-realtime from skills.sh or use a copy-paste prompt for any AI agent to wire Vask into a Pusher-compatible stack.
  • Laravel - Complete guide for Laravel Broadcasting with queues, channels, and events.
  • Channels - Public, private, presence, cache, and encrypted channel behavior.
  • Events - Server events, client events, batch events, recipient exclusion, and subscription counts.
  • Authentication and signatures - Channel authorization, user authentication, and HTTP API signing.
  • User authentication - pusher:signin, pusher:signin_success, watchlists, and user-scoped features.
  • WebSocket protocol - wss://wss.vask.dev/app/{app_key} frames and close codes.
  • HTTP API reference - https://api.vask.dev/apps/{app_key}/... endpoints and request signing.
  • Cache channels - Last-event replay and cache miss handling.
  • Encrypted channels - End-to-end encrypted private channels.
  • Watchlist events - Online/offline updates for signed-in users.
  • User connections - Send events to users and terminate signed-in user connections.
  • Subscription count - Live count events, API info responses, and webhooks.
  • Webhooks - Pusher-compatible webhooks for channel and presence events, with signing and retry details.
  • JavaScript - Pure JavaScript integration without frameworks. Coming soon.
  • PHP - Server-side PHP integration guide. Coming soon.

#Channels

Channels are the fundamental way to organize and filter data streams. Vask supports three types of channels:

  • Public channels - Can be subscribed to by anyone who knows the channel name.
  • Private channels - Require authentication and are prefixed with private-.
  • Presence channels - Like private channels but also track who's online, prefixed with presence-.

#Events

Events are messages sent through channels to connected clients. Each event has:

  • A name that identifies the type of message.
  • Optional data payload (JSON).
  • Automatic metadata like timestamps and socket IDs.

Events can be triggered from your server or directly from authenticated clients (client events).

#Limits

Vask accepts WebSocket message payloads up to 64KB per message. Messages larger than 64KB are rejected, so split larger data or send a reference to externally stored content.

#Authentication

Private and presence channels require authentication to ensure only authorized users can access sensitive data:

  1. Client requests to subscribe to a private/presence channel.
  2. Your server receives an authentication request at your configured endpoint.
  3. You verify the user's permissions and return a signed token.
  4. Client uses the token to complete the subscription.

Vask uses the same authentication mechanism as Pusher, making it fully compatible with existing auth endpoints.

Prefer raw markdown? View this page as markdown.