News & Announcements User Community Developer Community

Welcome to the RingCentral Community

Please note the community is currently under maintenance and is read-only.

Search
Make sure to review our Terms of Use and Community Guidelines.
  Please note the community is currently under maintenance and is read-only.
Home » Developers
Fax API Call Help
Tags: fax, rest api
Mar 17, 2018 at 8:02pm   •   1 replies  •  0 likes
jason4335

Body:


{ "message" : "Unsupported Media Type", "errors" : [ ] }


Header:


X-Rate-Limit-Window : 60

Status_Code : 415

RoutingKey : SJC11P01PAS01

Http_Version : HTTP/1.1

Explanation : Unsupported Media Type

Connection : close

Content-Language : en-US

Date : Sun, 18 Mar 2018 02:55:08 GMT

X-Rate-Limit-Group : heavy

Server : nginx/1.10.2

RCRequestId : c479c8b0-2a57-11e8-a5f0-005056bb594d

Content-Type : application/json;charset=UTF-8

X-Rate-Limit-Limit : 10

X-Rate-Limit-Remaining : 9

Content-Length : 60


Code:


To decipher Coldfusion, I am telling it to submit a multi-part form encoded in UTF-8. I know most of you don't know Coldfusion, but you can see my variables below...do I even have the correct variables here?


<cfhttp method="post"

url="#final_url#"

multipart="yes"

resolveurl="no"

charset="utf-8"

name="faxes"


>


<cfhttpparam type="header" name="authorization" value="#authorization#">

<cfhttpparam type="header" name="content-type" value="text/plain">


<cfhttpparam type="formField" name="to" value="#ringcentralFax.toFaxNumber#">

<cfhttpparam type="formField" name="faxResolution" value="#ringcentralFax.faxResolution#">

<cfhttpparam type="formField" name="attachment" value="#faxFileName#">


<cfhttpparam type="file" name="#faxFileName#" file="#faxFilePath#">



</cfhttp>


1 Answer
answered on Mar 19, 2018 at 1:15pm  
I haven't used Cold Fusion but the following content type looks incorrect:

<cfhttpparam type="header" name="content-type" value="text/plain">

The HTTP request header should be "mutipart/form-data" instead of "text/plain".

To spot check your entire request, you should inspect the HTTP request headers and body that is constructed. You can dump this yourself or send it to a service like RequestBin (https://requestb.in/).

Your HTTP request should look something like the example in the Developer Guide:

http://ringcentral-api-docs.readthedocs.io/en/latest/messages_faxes/


 0



A new Community is coming to RingCentral!

Posts are currently read-only as we transition into our new platform.

We thank you for your patience
during this downtime.

Try Workflow Builder

Did you know you can easily automate tasks like responding to SMS, team messages, and more? Plus it's included with RingCentral Video and RingEX plans!

Try RingCentral Workflow Builder

PRODUCTS
RingEX
Message
Video
Phone
OPEN ECOSYSTEM
Developer Platform
APIs
Integrated Apps
App Gallery
Developer support
Games and rewards

RESOURCES
Resource center
Blog
Product Releases
Accessibility
QUICK LINKS
App Download
RingCentral App login
Admin Portal Login
Contact Sales
© 1999-2024 RingCentral, Inc. All rights reserved. Legal Privacy Notice Site Map Contact Us