Sinch Node.js SDK - v1.5.0
    Preparing search index...

    Class ConversationCallbackWebhooks

    Index

    Constructors

    Methods

    • Add the trigger corresponding to the trigger 'message' <==> MESSAGE_INBOUND 'message_redaction' <==> MESSAGE_INBOUND_SMART_CONVERSATION_REDACTION 'message_submit_notification' <==> MESSAGE_SUBMIT 'message_delivery_report' <==> MESSAGE_DELIVERY 'event' <==> EVENT_INBOUND 'event_delivery_report' <==> EVENT_DELIVERY 'conversation_start_notification' <==> CONVERSATION_START 'conversation_stop_notification' <==> CONVERSATION_STOP 'conversation_delete_notification' <==> CONVERSATION_DELETE 'contact_create_notification' <==> CONTACT_CREATE 'contact_delete_notification' <==> CONTACT_DELETE 'contact_merge_notification' <==> CONTACT_MERGE 'contact_update_notification' <==> CONTACT_UPDATE 'duplicated_identities' <==> CONTACT_IDENTITIES_DUPLICATION 'capability_notification' <==> CAPABILITY 'opt_in_notification' <==> OPT_IN 'opt_out_notification' <==> OPT_OUT 'channel_event_notification' <==> CHANNEL_EVENT 'unsupported_callback' <==> UNSUPPORTED 'smart_conversation_notification' <==> SMART_CONVERSATIONS

      Parameters

      • eventBody: any

        The conversation event to parse

      Returns ConversationWebhookEventParsed

      • Parsed conversation event.

      If the eventBody is not valid or cannot be parsed.

    • Validate authorization header for callback request

      Parameters

      • headers: IncomingHttpHeaders

        Incoming request's headers

      • body: any

        Incoming request's body

      • Optional_path: string

        Incoming request's path

      • Optional_method: string

        Incoming request's HTTP method

      Returns boolean

      • true if the X-Sinch-Signature header is valid
    • Static reviver for a Conversation Event. This method ensures the object can be treated as a Conversation Event.

      Parameters

      • eventBody: any

        The event body containing the Conversation event notification.

      Returns ConversationWebhookEventParsed

      • The parsed Conversation event object