Interface WebHooksService
public interface WebHooksService
Webhooks service
The Conversation API delivers contact messages, delivery receipts for app messages and various notifications through callbacks.
- Since:
- 1.3
-
Method Summary
Modifier and TypeMethodDescriptionCreates a webhook for receiving callbacks on specific triggersvoid
Deletes a webhook as specified by the webhook IDGet a webhook as specified by the webhook ID.List all webhooks for a given app as specified by the App ID.parseEvent
(String jsonPayload) This function can be called to deserialize received payload onto callback onto proper java verification event classUpdates an existing webhook as specified by the webhook ID.boolean
The Sinch Platform can initiate callback requests to a URL you define (Callback URL) on request and result events.
-
Method Details
-
validateAuthenticationHeader
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 requestBy 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 dashboardheaders
- Received headersjsonPayload
- Received payload- Returns:
- Is authentication is validated (true) or not (false)
- Since:
- 1.3
-
parseEvent
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:
- 1.3
-
list
List all webhooks for a given app as specified by the App ID.- Parameters:
appId
- The unique ID of the app- Returns:
- List of defined webhooks
- Since:
- 1.3
-
get
Get a webhook as specified by the webhook ID.- Parameters:
webhookId
- The unique ID of the webhook.- Returns:
- Webhook definition
- Since:
- 1.3
-
create
Creates a webhook for receiving callbacks on specific triggers- Parameters:
webhook
- Webhook parameter for creation- Returns:
- Created webhook
- Since:
- 1.3
-
update
Updates an existing webhook as specified by the webhook ID.- Parameters:
webhookId
- The unique ID of the webhook.webhook
- Webhook parameter for creation- Returns:
- Created webhook
- Since:
- 1.3
-
delete
Deletes a webhook as specified by the webhook ID- Parameters:
webhookId
- The unique ID of the webhook.- Since:
- 1.3
-