This recipe contains an example express.js application to receive incoming webhook events from the httpsms.com API. You can use this code as inspiration for creating a consumer for webhook events from httpsms.com.
httpSMS webhook documentation: https://docs.httpsms.com/webhooks/introduction
- express 4.x - Express framework
- jsonwebtoken - Used to authenticate webhook requests.
The /httpsms/webhook
endpoint authenticates webhook requests from httpSMS using the Bearer
JWT token.
You can optionally set your webhook signing key in the HTTPSMS_WEBHOOK_SIGNING_KEY
environment variable. This key is used to validate the bearer token in the webhook request.
Run the node JS application to listen to events using the command below
docker run -p 3000:3000 --env HTTPSMS_WEBHOOK_SIGNING_KEY="/* your webhook signing key */" ndolestudio/httpsms-express
In-order to receive events from httpsms.com to the application running on your local computer, you have to setup ngrok.io to listen on localhost:3000
ngrok http localhost:3000
Now configure your webhook endpoint https://httpsms.com/settings to point to the URL provided by ngrok. When you receive an SMS, you will see the logs in your terminal as shown in the image below.
If you discover a security vulnerability within the dompdf-api service, please send an e-mail to Acho Arnold via [email protected]. All security vulnerabilities will be promptly addressed.
This recipe is an open-sourced software licensed under the MIT license.