question

patient-fax8042 avatar image
patient-fax8042 asked patient-fax8042 commented

Getting messageStatus = "SendingFailed" and faxErrorCode = "RenderingFailed" ?

Hi Team,

I am getting messageStatus = "SendingFailed" and faxErrorCode = "RenderingFailed"getting while sending fax message, what can be the reason ?


General Topic
1 |1500 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Tyler Liu avatar image
Tyler Liu answered
RenderingFailed usually means contentType is wrong.

For example, you want to fax a PNG image, and you specify contentType = "application/pdf". Server side cannot render a PNG image as PDF, thus RenderingFailed.
1 |1500 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

patient-fax8042 avatar image
patient-fax8042 answered patient-fax8042 commented
Hi Tyler,

I have specified correct contentType in my fax message but though its giving me above error.don't know how.

i have attached one pdf file in fax message and given contentType = "application/pdf".

here is response where xyz specify messageid.

{
  "uri": " https://platform.devtest.ringcentral.com/restapi/v1.0/account/~/extension/~/message-store/xyz";,
  "id": xyz,
  "to": [
    {
      "phoneNumber": "+14246347683",
      "location": "Redondo, CA",
      "messageStatus": "SendingFailed",
      "faxErrorCode": "RenderingFailed"
    }
  ],
  "type": "Fax",
  "creationTime": "2017-12-06T04:58:58.000Z",
  "readStatus": "Unread",
  "priority": "Normal",
  "attachments": [
    {
      "id": xyz,
      "uri": " https://media.devtest.ringcentral.com/restapi/v1.0/account/~/extension/~/message-store/xyz/content/x...;,
      "type": "RenderedDocument",
      "contentType": "application/pdf"
    }
  ],
  "direction": "Outbound",
  "availability": "Alive",
  "messageStatus": "SendingFailed",
  "faxResolution": "High",
  "faxPageCount": 0,
  "lastModifiedTime": "2017-12-06T05:05:23.637Z",
  "coverIndex": 7,
  "coverPageText": "TEst note"
}
4 comments
1 |1500 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

I'd like to see the code you used to send the fax.
0 Likes 0 ·
we are using following code after authorization.

var attachment1 = new Attachment { fileName = documentName, contentType = fileType, bytes =  Encoding.UTF8.GetBytes(outArray)};

var attachments = new Attachment[] { attachment1  };


varextension=rc.Restapi().Account().Extension();

ToFax="+14246347683";


var response=await extension.Fax().Post(new FaxPath.PostParameters{
  to=new CallerInfo[] { new CallerInfo { phoneNumber=ToFax } },
  coverPageText=CoverPageText,
  coverIndex=CoverIndex
},
attachments );
0 Likes 0 ·
I am not sure. But from 'bytes = Encoding.UTF8.GetBytes(outArray)' I conclude that 'outArray' is a string. If it is a PDF file, how can you represent it as a string?

You should read the PDF bytes like this: bytes = System.IO.File.ReadAllBytes(" test.pdf")
0 Likes 0 ·
Hi Tyler,

above solution worked for us. thank you for your help
0 Likes 0 ·

Developer sandbox tools

Using the RingCentral Phone for Desktop, you can dial or receive test calls, send and receive test SMS or Fax messages in your sandbox environment.

Download RingCentral Phone for Desktop:

Tip: switch to the "sandbox mode" before logging in the app:

  • On MacOS: press "fn + command + f2" keys
  • On Windows: press "Ctrl + F2" keys