const rcsdk = new SDK({ server: ringCentral.serverURL, clientId: ringCentral.clientId, clientSecret: ringCentral.clientSecret }) async function getPlatformLoggedIn() { const platform = rcsdk.platform() await platform.login({ jwt: ringCentral.jwtToken }) return platform } async function sendFax(input: SendFaxOptions) { const formData = new FormData() formData.append('attachment', input.attachments[0], { filename: 'correctPDF.pdf', contentType: 'application/pdf' }) formData.append('to', JSON.stringify(input.to)) formData.append('faxResolution', 'High') console.log('Logging in') const platform = await getPlatformLoggedIn() console.log('Sending Fax') const response = await platform.post(SEND_FAX_PATH, formData) console.log('response: ', JSON.stringify(response, null, 2)) }
No matter the number I send, it returns the same error message, and judging by the 400 error, I am correctly authenticated, I tried putting invalid credentials and the error happened before I tried to send the fax out.