Skip to content

Commit bed5fbc

Browse files
committed
Adding twilio-signature-cli and twilio-signature options
1 parent 3a561de commit bed5fbc

File tree

1 file changed

+25
-1
lines changed

1 file changed

+25
-1
lines changed

mcp-server/README.md

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ const signature =
116116
);
117117
```
118118

119-
Or, with the `twilio` Node package installed:
119+
or, with the [`twilio`](https://www.npmjs.com/package/twilio) Node package installed:
120120

121121
```javascript
122122
const twilio = require("twilio");
@@ -132,6 +132,30 @@ const signature =
132132
);
133133
```
134134

135+
or, with the [`twilio-signature`](https://www.npmjs.com/package/twilio-signature) Node package installed, a lightweight alternative:
136+
137+
```javascript
138+
import { createTwilioSignature } from 'twilio-signature';
139+
const dotenv = require("dotenv");
140+
141+
dotenv.config();
142+
143+
const signature =
144+
createTwilioSignature(
145+
process.env.TWILIO_AUTH_TOKEN,
146+
`${process.env.TWILIO_DOMAIN_NAME}/mcp?services=...`,
147+
{}
148+
);
149+
```
150+
151+
#### npx with [`twilio-signature-cli`](https://www.npmjs.com/package/twilio-signature-cli)
152+
153+
This CLI tool makes it easy to generate Twilio signatures for webhook validation without writing any code. It's perfect for testing and debugging Twilio webhook integrations, or for generating signatures in automated scripts.
154+
155+
```shell
156+
npx twilio-signature-cli -t TWILIO_AUTH_TOKEN -u YOUR_FUNCTION_URL
157+
```
158+
135159
#### Python
136160

137161
```python

0 commit comments

Comments
 (0)