This extension for Paw assists you in generating the X-Twilio-Signature
header by sorting the body/form data from your request and appending it to the request URL, as documented by Twilio.
- Clone this project to your computer. You can retain git data for easy updates. https://github.com/scottswezey/Paw-XTwilioSignatureData
- Open Paw, then Preferences, then the Extensions tab.
- Click the button to "Open Extensions Directory" found near the bottom of the page.
- Drag the entire
com.scottswezey.PawExtensions.XTwilioSignatureData
folder into the Pawextensions
folder. - You may need to press the "Reload Installed Extensions" button in the Paw Extension Preferences.
- Utilize git to update the project, or periodically download a new copy of from GitHub.
- In Paw, select the Headers tab in a request.
- Add a new header with the name
X-Twilio-Signature
. - In the header value, choose
HMAC-SHA1
. The input will beX-Twilio-Signature-Data
, the key should be your TwilioAuthToken
or a subsitute used for testing webhooks. Be wary of using your actual Twilio production credentials. - Leave Algorithm set to
HMAC-SHA1
and Encoding set toBase64
- Ensure irrelevant fields are not included in the request. (Ex
MessageServiceSid
when not emulating a messaging service) Such fields would be used in the signature calculation and thus incorrectly emulate Twilio's actual webhooks. - Preview the request to ensure the signature is added.
- https://www.twilio.com/docs/usage/webhooks
- https://www.twilio.com/docs/usage/webhooks/webhooks-security
- https://www.twilio.com/docs/usage/security#validating-requests
- https://www.twilio.com/docs/usage/webhooks/webhooks-faq
- https://www.twilio.com/docs/sms/twiml#twilios-request-to-your-application
- https://www.twilio.com/docs/sms/debugging-common-issues
- See my blog post on using Paw for Twilio SMS Webhooks: Mock SMS Message Webhooks from Twilio with Paw.
- Check our my sample Paw project: Twilio SMS Webhooks.paw.
- Easily recieve and inspect incoming webhooks with a service like Request Bin.
- Issues, discussions, and pull requests are welcome on GitHub.
- Please open a discussion or issue to discuss major changes. While contributions are generally welcome, it's best to ensure the change will be accepted into the project before investing much time.
- This project is versioned using the SEMVER 2.0.0 rules.
- Do not bump the version number.
Scott Swezey (GitHub)
This project and all contributions are MIT licensed. See LICENSE
for further details.