palbaseDocs

Palbase Realtime · API

POST/realtime/revalidate

Decide a channel's members again

Decides again, on every replica, who may be on the project's channels it names, and drops the members no longer allowed: the project's server says a decision its machine made may no longer hold — a member taken out of a chat, a team changed. A channel (topic), or every channel of a gateway's pattern whose named captures have the values given (pattern, params); only one user's memberships (user); or, with a topic, the channel's end (end): every member dropped unasked, and its log forgotten. A dropped member's client is told the channel closed, and its rejoin is decided on the merits.

Called by your server, with the project's secret key.

Request body

endboolean · optionalWith a topic and no user: the channel is over — every member dropped unasked, its log forgotten.
paramsobject · optionalValues of the pattern's captures: a capture not named is any value.
patternstring · optionalA gateway's pattern, as chat:{chatId}:user:{userId}.
topicstring · optionalOne channel of the project's.
userstring · optionalOnly this user's memberships.
curl
curl -X POST "https://<your-ref>.palbase.studio/realtime/revalidate" \
  -H "apikey: $PALBASE_SECRET_KEY" \
  -H "content-type: application/json" \
  -d '{"end":false,"params":{},"pattern":"string","topic":"string","user":"string"}'

Responses

202Every replica is told

400The request is malformed: a field, a channel or a pattern is wrong

401No key, or not a key of this project, or a token that is not valid (the edge's answer)

403Not the project's secret key

503The platform could not answer now; retrying is safe (Retry-After)

defaultAn error: the envelope names it (`error`) and explains it (`error_description`).

Operation Revalidate of realtime's contract.