Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validate webhooks for parity with v1 SDK #122

merged 6 commits into from Apr 9, 2019


None yet
2 participants
Copy link

commented Apr 8, 2019

This PR resolves #121

Using the SDK, you can now validate incoming webhooks by passing a PSR-7 MessageInterface and the secret key used when creating the webhook. From there, the functionality is the same as with v1 of the SDK - you can determine if the webhook is a convo, customer, or test. If a convo or customer, you can retrieve the associated entity.

Future enhancements would be to add checks for all the possibly event types as well as to automatically hydrate the entity and sub-entities from the API rather than relying upon what is in the payload.

davidstanley01 added some commits Apr 8, 2019

@davidstanley01 davidstanley01 requested a review from bkuhl Apr 8, 2019


bkuhl approved these changes Apr 8, 2019

Copy link

left a comment

This looks great! A nice to have on this would be a full example showing how to check the event type

@bkuhl bkuhl merged commit 21f25d7 into v2 Apr 9, 2019

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
continuous-integration/travis-ci/push The Travis CI build passed

@bkuhl bkuhl deleted the validate-webhooks branch Apr 9, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.