1

I am working with TWILIO and Sharepoint 2016 to send text messages. I have created a Studio Dashboard to send the text messages and a Twilio function to send a response back to a Sharepoint list. My website is external facing with FBA accounts

All of this works if I paste the FEDAUTH code in my function. My question is how do I get the FEDAUTH code ? The pasted FEDAUTH seems to expire after awhile.

exports.handler = function(context, event, callback) {
    var options = {
        "method": "GET",
        "hostname": "www.mysite.org",
        "port": null,
        "path": "/_layouts/15/Login.aspx",
        "headers": {
            "authorization": xxxx,
            "content-type": "application/x-www-form-urlencoded",
            "cache-control": "no-cache",
        }
    };

    var req = http.request(options, function(res) {
        var chunks = [];

        res.on("data", function(chunk) {
            chunks.push(chunk);
        });

        res.on("end", function() {
            var body = Buffer.concat(chunks);

            sendAPI();// passed FEDAUTH to /_api/contextinfo/
        });
    });
    req.end();
};

0 Answers0