Cas
BBuildShip
•Created by Cas on 10/4/2024 in #❓・buildship-help
Enable Basic Auth for Twilio API with WWW-Authenticate header
I am trying to setup basic authentication for my Twilio intergration.
The Twilio docs describe the following:
If you specify a password-protected URL, Twilio will first send a request with no Authorization header. After your server responds with a 401 Unauthorized status code, a WWW-Authenticate header and a realm in the response, Twilio will make the same request with an Authorization header.
I am stuck with how to respond with a 401 unauthorized with a WWW-Authenticate header and a realm in the response. The default response node does not include a header and realm. Hopefully someone knows how to create a node that responds with something like:
HTTP/1.1 401 UNAUTHORIZED
WWW-Authenticate: Basic realm="My Realm"
Date: Wed, 21 Jun 2017 01:14:36 GMT
Content-Type: application/xml
Content-Length: 327
https://www.twilio.com/docs/usage/security#http-authentication
5 replies