Interface SinchEventsService


public interface SinchEventsService
Sinch Events service

Callback events are used to get notified about Conversation usage according to your configured callback URL

see online documentation

Since:
2.0
  • Method Summary

    Modifier and Type
    Method
    Description
    parseEvent(String jsonPayload)
    This function can be called to deserialize received payload onto callback onto proper java verification event class
    boolean
    validateAuthenticationHeader(String secret, Map<String,String> headers, String jsonPayload)
    The Sinch Platform can initiate callback requests to a URL you define (Callback URL) on request and result events.
  • Method Details

    • validateAuthenticationHeader

      boolean validateAuthenticationHeader(String secret, Map<String,String> headers, String jsonPayload)
      The Sinch Platform can initiate callback requests to a URL you define (Callback URL) on request and result events. All callback requests are signed and the signature is included in the Authorization header of the request

      By using following function, you can ensure authentication according to received payload from your backend

      Parameters:
      secret - Secret token to be used to validate received request. See App's webhook configuration onto dashboard
      headers - Received headers
      jsonPayload - Received payload
      Returns:
      Is authentication validated (true) or not (false)

      see online documentation

      Since:
      2.0
    • parseEvent

      ConversationSinchEvent parseEvent(String jsonPayload) throws ApiMappingException
      This function can be called to deserialize received payload onto callback onto proper java verification event class
      Parameters:
      jsonPayload - Received payload to be deserialized
      Returns:
      The verification event instance class

      see triggered events

      Throws:
      ApiMappingException
      Since:
      2.0