Skip to content

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.

MethodPathWhat it does
GET/appApp facts a client needs before signing in
GET/broadcasting/authAuthorise a WebSocket channel (alias of POST)
POST/broadcasting/authAuthorise 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
FieldTypeRequiredDescription
dataobject
data.namestring
data.versionstring
data.api_versionstring
data.editionobject
data.edition.modestringOne of: single, saas.
data.edition.signupbooleanVisitors may create accounts.
data.edition.googleboolean"Continue with Google" is on (GET /auth/google starts it).
data.modulesstring[]
data.realtimeobjectHow to get live updates. Polling endpoints always work; use the WebSocket when transport is websocket.
data.realtime.transportstringOne of: websocket, polling.
data.realtime.poll_secondsinteger
data.realtime.websocketobject, 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 ​

NameInTypeRequiredDescription
socket_idquerystringyes
channel_namequerystringyes

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

FieldTypeRequiredDescription
socket_idstringyes
channel_namestringyes

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"}'

Replora: see what your visitors see.