Skip to main content

1. Sign Up

Create your WireSocket account at dashboard.wiresocket.com. Your tenant account is free. No credit card required to get started.

2. Create an OAuth 2 Application

To connect to the WireSocket dataplane, a JWT access token is required. Tokens are issued through an OAuth 2 Machine-to-Machine (M2M) flow — to set this up, first create an OAuth 2 app in the dashboard.
1

Open the Apps section

Navigate to Apps in the dashboard sidebar and click Add Application.
2

Name your app

Give your app a name that identifies the product or service connecting to WireSocket (e.g. my-editor-prod).
3

Set the License Region

Choose the License Region for this app. This defines where your app’s license and plan data is stored.
The License Region is a “set-once” property. These regions are prefixed with aws- (e.g., aws-us-east-1). Choose the one closest to your primary user base.
4

Save your credentials

After creation, copy your Client ID and Client Secret immediately. The secret is shown only once.
Never expose your client_secret in browser code or public repositories. It is a server-side credential only.

3. Activate a Plan

Your app cannot connect to the WireSocket dataplane until a plan is active. Open your app from the Apps list and go to the Plans tab. Select the plan that fits your needs — including Free — and click Subscribe to activate it.
Each app requires its own plan. An app without an active plan cannot issue tokens or connect to the dataplane.
Only one app per account can be on the Free plan. Additional apps require a paid plan to activate dataplane access.

4. Get an Access Token

Exchange your credentials for a JWT access token from your backend server.
curl -X POST https://api.wiresocket.com/connect/token \
  -H "Content-Type: application/x-www-form-urlencoded" \
  -d "grant_type=client_credentials" \
  -d "client_id=YOUR_CLIENT_ID" \
  -d "client_secret=YOUR_CLIENT_SECRET" \
  -d "scope=WireSocket.API offline_access"
Response:
{
  "access_token": "eyJ...",
  "refresh_token": "eyJ...",
  "token_type": "Bearer",
  "expires_in": 900
}
Access tokens are valid for 15 minutes. Use the refresh_token to obtain a new access token without re-authenticating. See Token Renewal for implementation guidance.
The JWT contains your app’s plan limits. The WireSocket dataplane reads these claims directly — no database lookup required.

5. Connect to the Dataplane

Pass the access token when connecting your Yjs provider to the WireSocket dataplane. Two methods are supported:

You’re Connected

Your Yjs document is now syncing through WireSocket. Any changes made by connected clients are propagated in real-time.

Token Renewal & Auth

Implement refresh token rotation and keep connections alive beyond 15 minutes.

Dataplane & Editor Setup

Handle regions, reconnection logic, and editor integration.
Last modified on March 3, 2026