/ 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

    webhook_status_code

    integer

    Specifies the HTTP status code of the failed webhook.

    webhook_category

    string

    Specifies the category of the failed webhook depending on the failure type.

    limit

    integer

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

    next_ts

    long

    Specifies the pagination timestamp in Unix milliseconds to be the reference point of the query when retrieving the next page of failed webhooks.


    Responses

    Copy link

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

    {
        "webhook_logs":[
            {
                "id":1,
                "app_uuid":"11111111-1111-1111-1111-1111111111",
                "webhook_category":"webhook",
                "webhook_url":"http://example.com?query=@123&abc=lm%EB%GAHA",
                "webhook_status_code":400,
                "ts":1675806910,
                "month":1,
                "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":1675806910}"
            },
            {
                "id":2,
                "app_uuid":"44444444-4444-4444-444444444",
                "webhook_category":"webhook",
                "webhook_url":"http://example.com?query=@123&abc=lm%EB%GAHA",
                "webhook_status_code":400,
                "ts":1675807910,
                 "month":1,
                 "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":1675807910}"
            },
            {
                "id":3,
                "app_uuid":"22222222-2222-2222-2222-22222222",
                "webhook_category":"webhook",
                "webhook_url":"http://example.com?query=@123&abc=lm%EB%GAHA",
                "webhook_status_code":400,
                "ts":1675808910,
                "month":1,
                "webhook_payload":"{"category":"group_channel:reaction_add", "app_id":"22222222-2222-2222-2222-22222222", "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":1675808910}"
            },
            {
                "id":4,
                "app_uuid":"33333333-3333-3333-3333333",
                "webhook_category":"webhook",
                "webhook_url":"http://example.com?query=@123&abc=lm%EB%GAHA",
                "webhook_status_code":400,
                "ts":1675810910,
                "month":1,
                "webhook_payload":"{"category":"group_channel:reaction_add", "app_id":"33333333-3333-3333-3333333", "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":1675810910}"
            }
        ],
    "next":""
    }
    

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