I have following code in nodejs, but zapier doesnot support request module. Using fetch or standard http method, can this be implemented in my zap?
request(
{
url: "https://wechat.com/",
auth: {
bearer: accessToken
}
},
function(err, res) {
//do something
}
);
David here, from the Zapier Platform team. Yeah, this is pretty straightforward with fetch
.
You need to set the Authentication
header to bearer mytoken
:
const myToken = "ABCD";
const response = await fetch("https://self.wavity.net/scim/doc/", {
headers: { Authentication: `bearer ${myToken}` }
});
You can also use the base-64
library to encode the token if you need as described here.