The RingCentral API supports over 10 different fax cover page templates, however, it does not currently support custom cover pages which are available in the RingCentral for Desktop softphone application.
These demos show how to create and use your own custom cover page.
This is done by creating a cover page in your app and then using that as the first attachment in a fax, while also disabling RingCentral provided cover pages.
These demos have the following steps, using the Handlebars template engine:
- Render the Handlebars cover page template
- Add it as the first attachment ahead of others, while disabling the standard cover page
- Resulting in a fax with a custom cover page and body (redacted)
When using these demos, the fax API coverIndex
parameter should be set to 0
so that no cover page is added.
The RingCentral Fax API can accept requests in multipart/mixed
and multipart/form-data
. These demos will use multipart/mixed
.
To do this:
- Create your own cover page and then add it as as the first MIME part in the request. RingCentral's fax API can support many file types including PDF, DOCX, DOC, HTML, plaintext, etc. For this demo we will use HTML since it provides formatting and does not require complex rendering like PDF. The Handlebars template engine is used because it is supported by many languages and supports some more complex constructs than Mustache.
- Wrap the cover page HTML in an appropriate part for the language / SDK you are using, e.g. a
RingCentral.SDK.Helper.Attachment
object for C# and aMIME::Text
object for Ruby. - Add the wrapped mime part to the list of attachments in the fax request.