MENU
      Viewing chats
        • PDF

        Viewing chats

        • PDF

        Article summary

        It is an API to view chats. For the use flow of B2B PRISM Live Studio, see Chat process.

        Note
        • It transfers, views, and deletes chats on Live.
        • Viewing chats views the live until it is finished in approximately 5-second intervals.
        • You cannot use the chat function if the chat transfer/view/delete API is not provided.
        • Only the API for transferring chats can be provided. However, in this case, you cannot see the chats.

        Requests

        The request format is as follows:

        POST /prism/v1/service/live/{liveId}/chat
        HTTP

        Request headers

        The description of the header is as follows:

        NameTypeDescriptionRequired
        x-prism-access-tokenStringAccess Token issued through OAuth2.0 authorizationY

        Request path parameters

        The description of the parameters is as follows:

        NameTypeDescriptionRequired
        liveIdStringLive IDY

        Request body

        The description of the body is as follows:

        NameTypeDescriptionRequired
        maxResultsNumber
      • Maximum number of chat messages to import
      • Maximum value is 100, and only 100 is provided if the value is 0 or more than 100
      • When specifying 0, all messages are forwarded
      • Y
        pageTokenString
      • Used when bringing the data after the data brought from the previous page
      • For pageToken != null, forwards the chat message list after the specified pageToken
      • For pageToken = null & maxResults != 0, provides the latest messages - maxCount
      • For pageToken = null & maxResults = 0, provides the latest messages - 100
      • Y

        Responses

        This is a description of the response format.

        Note

        For the basic response format, see the Basic format for API responses.

        NameTypeDescriptionRequired
        liveIdStringLive IDY
        nextPageTokenString
      • When entering the nextPageToken you acquired by viewing with the previous API in pageToken and viewing, it searches the chat messages that are newly entered first
      • If there is no chat message that is newly entered, nextPageToken provides the same value as the pageToken you requested
      • Y
        messagesObject
      • Chat message list
      • If there is no chat message, the corresponding item is provided as empty array
      • Y

        message dto

        The description of the message dto is as follows:

        NameTypeDescriptionRequired
        messageIdString
      • Chat message ID
      • If deleting chat function is not provided, messageId does not have to be provided
      • N
        messageAtDate
      • Time that chat messages are entered
      • Provided in ISO 8601 format
      • N
        authorIdString
      • userId that entered the chat message
      • Y
        authorNameString
      • Name of user who entered the chat message
      • Chat messages of the user with no name can be ignored
      • Y
        authorProfileThumbnailString
      • Thumbnail image of the user who entered the chat message
      • In the case of no authorProfileThumbnail, the thumbnail is not exposed
      • N
        isLiveOwnerBoolean
      • Whether the corresponding chat user is a streamer of the current live or not
      • The ID within the prism can be shown differently
      • In the case of not applicable, shown the same as a regular chat
      • N
        isLiveManagerBoolean
      • In the case of providing a manager function, whether the corresponding chat user is a manager or not
      • The ID within the prism can be shown differently
      • In the case of not applicable, shown the same as a regular chat
      • N

        How to provide page token

        To provide a page token, follow these steps:

        b2bpls-chats_page-token_ko

        Examples

        Introduces examples of syntax.

        Request examples

        An example of the syntax is as follows:

        curl -X POST /prism/v1/service/live/{liveId}/chat
            -H "x-prism-access-token: {access-token}"
        Bash

        Response examples

        An example of the syntax is as follows:

        {
            "success": true,
            "errorCode": 0,
            "errorName": null,
            "message": null,
            "data": {
                "liveId": 6,
                "nextPageToken": 8239,
                "messages": [
                    {
                        "messageId": 12,
                        "message": "Create chat test 2023-09-05 11:10:27",
                        "messageAt": "2023-09-05T11:10:27+09:00",
                        "authorId": "admin",
                        "authorName": "admin",
                        "authorProfileThumbnail": null,
                        "isLiveOwner": true,
                        "isLiveManager": false
                    },
                    {
                        "messageId": 13,
                        "message": "Create chat test 2023-09-05 11:25:11",
                        "messageAt": "2023-09-05T11:25:11+09:00",
                        "authorId": "admin",
                        "authorName": "admin",
                        "authorProfileThumbnail": null,
                        "isLiveOwner": true,
                        "isLiveManager": false
                    }
                ]
            }
        }
        JSON

        Was this article helpful?

        What's Next
        Changing your password will log you out immediately. Use the new password to log back in.
        First name must have atleast 2 characters. Numbers and special characters are not allowed.
        Last name must have atleast 1 characters. Numbers and special characters are not allowed.
        Enter a valid email
        Enter a valid password
        Your profile has been successfully updated.