Appearance
App API
All paths are relative to https://your-site.com/api/v1. Send Authorization: Bearer <token> and Accept: application/json; see authentication and errors.
| Method | Path | What it does |
|---|---|---|
| GET | /app | App facts a client needs before signing in |
| GET | /broadcasting/auth | Authorise a WebSocket channel (alias of POST) |
| POST | /broadcasting/auth | Authorise a WebSocket channel |
GET /app
App facts a client needs before signing in
No sign-in needed
This endpoint is public.
Responses
- 200 — Name, versions, edition and enabled modules.
Response fields
| Field | Type | Required | Description |
|---|---|---|---|
data | object | ||
data.name | string | ||
data.version | string | ||
data.api_version | string | ||
data.edition | object | ||
data.edition.mode | string | One of: single, saas. | |
data.edition.signup | boolean | Visitors may create accounts. | |
data.edition.google | boolean | "Continue with Google" is on (GET /auth/google starts it). | |
data.modules | string[] | ||
data.realtime | object | How to get live updates. Polling endpoints always work; use the WebSocket when transport is websocket. | |
data.realtime.transport | string | One of: websocket, polling. | |
data.realtime.poll_seconds | integer | ||
data.realtime.websocket | object, nullable |
bash
curl -X GET "https://your-site.com/api/v1/app" \
-H "Authorization: Bearer $REPLORA_TOKEN" \
-H "Accept: application/json"GET /broadcasting/auth
Authorise a WebSocket channel (alias of POST)
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
socket_id | query | string | yes | |
channel_name | query | string | yes |
Responses
- 200 — Pusher-protocol channel signature.
- 403 — Not allowed (not an administrator, or outside the token's abilities).
bash
curl -X GET "https://your-site.com/api/v1/broadcasting/auth" \
-H "Authorization: Bearer $REPLORA_TOKEN" \
-H "Accept: application/json"POST /broadcasting/auth
Authorise a WebSocket channel
Pusher-protocol channel authorisation for the WebSocket transport (session or Bearer token). Members of an account may join private-sites.{site} for their sites. Point the client's auth endpoint here (GET /app gives realtime.websocket.auth_endpoint).
Request body
application/json, required
| Field | Type | Required | Description |
|---|---|---|---|
socket_id | string | yes | |
channel_name | string | yes |
Responses
- 200 — Pusher-protocol channel signature ({auth}).
- 403 — Not allowed (not an administrator, or outside the token's abilities).
bash
curl -X POST "https://your-site.com/api/v1/broadcasting/auth" \
-H "Authorization: Bearer $REPLORA_TOKEN" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"socket_id":"text","channel_name":"private-sites.12"}'