-
SummaryFor example, in this line of code below I am getting the How can I get the actual value of the signature and timestamp??? Testing it with ngrok in my localhost I get a 403 error... and well... I don't know how to test it on the live site... maybe I should ask sendgrid..
The headers object looks like this:
The full code is here: Additional informationNo response ExampleNo response |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi, From the docs: https://nextjs.org/docs/app/api-reference/file-conventions/route#headers Or from MDN, https://developer.mozilla.org/en-US/docs/Web/API/Request/Request There's like two ways to get them, but since you are using the Request (req) object, you can use the const signature = req.headers.get("x-twilio-email-event-webhook-signature");
const timestamp = req.headers.get("x-twilio-email-event-webhook-timestamp"); |
Beta Was this translation helpful? Give feedback.
Hi,
From the docs: https://nextjs.org/docs/app/api-reference/file-conventions/route#headers
Or from MDN, https://developer.mozilla.org/en-US/docs/Web/API/Request/Request
There's like two ways to get them, but since you are using the Request (req) object, you can use the
.get
method.