Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Validate webhooks for parity with v1 SDK #122
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.