This section describes Chat API structure and main terms that will be used in API integration documentation. We will not dive into implementation of the chat service itself.
You can find full API methods list in Swagger spec.
User is authenticated Chat API client. Each user exists only in context of its application. If someone signs up into several applications even with same credentials, several independent users are registered.
External user is user authenticated from a 3rd party service via M2M API.
- Channel is entity that stores feed of messages and polls. Each channel exists only in context of its application. User of an application may join and leave channels.
- Application is entity that stores its users and channels.
- Message is a record in channel. Depending on its type, messages may have different payload. Regular user messages will have a plain-text content, creation date and identifier of user that created the message. System messages may have just a plain-text content. New types of messages may be added.
- Poll is entity created by moderator which includes a question and several anwer options. Polls are used to vote and collect statistics across channel participants.
Consider two examples:
Integrating chat into chess game that already has a server with registered users. A single application is created via Admin back-office page. Chess app server registers a user for each registered player. When a tournament is started, chess app server creates a new channel and adds into that channel users that represent tournament participants.
Building a chat app for communities. Each user may participate in several communities or even create his own community. Only users that belong to a community have the access its channels. Each community will be represented as a separate application on livedigital side, despite user is facing them in same iOS app. Think of workspaces in Slack.