I am working on C# platform and exploring it. I am trying to use Fax api and trying to download the fax attachment content in the code. I can see I get the binary data as output as response of the API once I input the message and attachment id:
I am working on C# platform and exploring it. I am trying to use Fax api and trying to download the fax attachment content in the code. I can see I get the binary data as output as response of the API once I input the message and attachment id:
You can check the following:
RestClient rc = new RestClient("ClientID", "ClientSecret", false);
await rc.Authorize("username", "extensionNumber", "password"); ...
var extension = rc.Restapi().Account().Extension();
var messages = response.records;
// fax var message = messages.Where(m => m.type == "Fax" && m.messageStatus != "SendingFailed" && m.attachments != null && m.attachments.Length > 0).Skip(3).First();
var content = await extension.MessageStore(message.id).Content(message.attachments[0].id).Get();
System.IO.File.WriteAllBytes("filename.ext", content.data);
full code reference: https://github.com/ringcentral/ringcentral-csharp-client/blob/master/RingCentral.Test/BinaryTest.cs
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:
2 People are following this question.