/ Platform API
Platform API
    Chat Platform API v3
    Chat Platform API
    Chat Platform API
    Version 3

    List moderated messages

    Copy link

    Retrieves a list of messages that are moderated by the profanity filter.


    HTTP request

    Copy link
    GET https://api-{application_id}.sendbird.com/v3/report/{channel_type}/{channel_url}/profanity_messages
    

    Parameters

    Copy link

    The following table lists the parameters that this action supports.

    Parameters
    RequiredTypeDescription

    channel_type

    string

    Specifies the type of a channel. Acceptable values are open_channels and group_channels.

    channel_url

    string

    Specifies the URL of a channel.

    message_ts

    long

    Specifies the timestamp to be the reference point of the query in Unix milliseconds.

    prev_limit

    int

    Specifies the number of moderated messages to retrieve before the time specified in message_ts. Acceptable values are 0 to 200, inclusive. (Default: 15)

    *You can only use either prev_limit or next_limit for each request.

    next_limit

    int

    Specifies the number of moderated messages to retrieve after the time specified in message_ts. Acceptable values are 0 to 200, inclusive. (Default: 15)

    *You can only use either prev_limit or next_limit for each request.

    OptionalTypeDescription

    user_id

    string

    The unique ID of a user.

    ?message_ts=1484208748703&next_limit=10
    

    Response

    Copy link

    If successful, this action returns a list of moderated messages that contain the original and replaced texts in the response body.

    {
        "messages": [
            {
                "message_id": 953064054,
                "user_id": "Jeff",
                "message_text": "Hey, kiss my ass!",
                "replaced_text": "Hey, kiss my ***!",
                "blocked_text": null,
                "message_ts": 1595599703726
            },
            {
                "message_id": 953060856,
                "user_id": "Robert",
                "message_text": "You're a pain in the ass",
                "replaced_text": "You're a pain in the ***!",
                "blocked_text": null,
                "message_ts": 1595599436982
            }
            ...
        ]
    }
    

    In the case of an error, an error object is returned. A detailed list of error codes is available here.