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

    Get failed webhooks

    Copy link

    This action retrieves failed webhook logs within the application. You can use various query parameters to determine the search scope of failed webhooks.

    Note: This feature is turned off by default. Contact us if you wish to use this feature.


    HTTP request

    Copy link
    GET https://api-{application_id}.sendbird.com/v3/applications/{app_id}/failed_webhooks
    

    Parameters

    Copy link

    The following table lists the parameters that this action supports.

    Parameters
    RequiredTypeDescription

    app_id

    string

    The unique ID of the application.

    start_ts

    long

    Specifies the start time of a period for filtering failed webhooks in Unix milliseconds format. The timestamp of failed webhook is in between the time period set by the start_ts and end_ts properties.

    end_ts

    long

    Specifies the end time of a period for filtering failed webhooks in Unix milliseconds format. The timestamp of failed webhook is in between the time period set by the start_ts and end_ts properties.

    OptionalTypeDescription

    limit

    integer

    Specifies the number of results to retrieve per page. Acceptable values are 1 to 100, inclusive. (Default: 10)

    token

    string

    Specifies a page token that indicates the starting index of results to retrieve. If not specified, the index is set to 0.


    Responses

    Copy link

    If successful, this action returns the failed webhooks in the response body.

    {
        "webhook_logs":[
            {
                "id":1,
                "webhook_category":"group_channel:reaction_add",
                "webhook_url":"http://example.com?query=@123&abc=lm%EB%GAHA",
                "webhook_status_code":400,
                "ts":1675806910000,
                "webhook_payload":{
                    "category":"group_channel:reaction_add",
                    "app_id":"11111111-1111-1111-1111-1111111111",
                    "channel":{
                        "channel_url":"sendbird_dummy_group_channel",
                        "name":"Group Channel",
                        "data":"",
                        "custom_type":"",
                        "is_distinct":false,
                        "is_super":false,
                        "is_public":false,
                        "is_discoverable":false,
                        "is_ephemeral":false
                    },
                    "message":{
                        "message_id":11111111,
                        "sender_id":"dummysender"
                    },
                    "reaction":"smile",
                    "ts":1644534894365
                }
            },
            {
                "id":2,
                "webhook_category":"group_channel:reaction_add",
                "webhook_url":"http://example.com?query=@123&abc=lm%EB%GAHA",
                "webhook_status_code":500,
                "ts":1675806920000,
                "webhook_payload":{
                    "category":"group_channel:reaction_add",
                    "app_id":"44444444-4444-4444-444444444",
                    "channel":{
                        "channel_url":"sendbird_dummy_group_channel",
                        "name":"Group Channel",
                        "data":"",
                        "custom_type":"",
                        "is_distinct":false,
                        "is_super":false,
                        "is_public":false,
                        "is_discoverable":false,
                        "is_ephemeral":false
                    },
                    "message":{
                        "message_id":11111111,
                        "sender_id":"dummysender"
                    },
                    "reaction":"smile",
                    "ts":1644534894365
                }
            }
        ],
        "next":""
    }
    

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