Common Community Client API

Source (manually imported from Hedgedoc)

This is a brief draft of what a common, standards-based client-server API for community chat-like apps could look like. The intent is to allow a variety of clients and a variety of servers, all with different intents, separately implementing a common-denominator API for client apps to use.

Authentication

Clients MUST be authenticated to use all non-GET endpoints, and any GET endpoints marked for authentication. This is handled by the server, but clients should expect to use OAuth2 against the server to ask for chat rights.

Well-Known Endpoints

GET /.well-known/cccapi-host.json

Should respond with a static file, modeled after the following:

Endpoints

GET /topics

Lists public topics, or topics that the authenticated user has access to. Topics are roughly equivalent to channels.

This does NOT correspond with the topics a user is listening to. This should be remembered in the client.

Response example (application/json):

Response example (text/csv):

GET /topic/:id/messages

Lists the messages in a room.

Response example (multipart/mixed):

Response example (application/json):

The original Gemtext version of this page can be accessed with a Gemini client: gemini://blakes.dev/hdoc/4A6xCFoqTxK_D4VkQKntvA.gmi

Gemini request details:

Original URL
gemini://blakes.dev/hdoc/4A6xCFoqTxK_D4VkQKntvA.gmi
Status code
Success
Meta
text/gemini
Proxied by
A modified version of kineto

Be advised that no attempt was made to verify the remote SSL certificate.