Authorization header is not specified Error Code AGW-401 onst rcsdk = new RC({
server: RINGCENTRAL_SERVER,
clientId: RINGCENTRAL_CLIENTID,
clientSecret: RINGCENTRAL_CLIENTSECRET,
});
const platform = rcsdk.platform();
platform.login({
jwt: RC_JWT,
});
platform.on(platform.events.loginSuccess, async () => {
const form = new FormData();
await send_fax(form);
});
const send_fax = async (formData) => {
const body = {
to: [{ phoneNumber: RECIPIENT }],
faxResolution: "High",
coverPageText: "This is a demo Fax page from Node JS",
};
formData.append("json", Buffer.from(JSON.stringify(body)), {
filename: "request.json",
contentType: "application/json",
});
formData.append(
"attachment",
require("fs").createReadStream("../../../assets/SampleFAXOut.pdf"),
{
filename: "testfax.pdf",
contentType: "application/pdf",
}
);
try {
// const token = Buffer.from(
//