Skip to main content
Question

MSG-344 Sending fax to extension numbers is not available

  • 10 October 2023
  • 1 reply
  • 98 views

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.



How do you specify the recipient phone number? It must be in an array. And all the params in the request body must be appended in a JSON string.

Check out the dev guide to learn more how to send faxes.


Reply