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
Ring Out API Endpoint returns - { "message" : "Unsupported Media Type", "errors" : [ ] }
Tags: ringout
Sep 21, 2018 at 10:25am   •   1 replies  •  0 likes
jameson-bevans

I have tried many times to make a Ring Out call from my web application that I am building that has its own little dialpad. I have made sure that the Outbound caller ID setting is not blocked for the RingOut from web setting. I am completely able to make a ringOut phone call using the API explorer, but I feel like I just might be missing some headers, or some wierd quirk that the documentation does not describe anywhere. And trust me I have looked all over the place. Either way, Here is an example request that I am making using Node.js to start the phone call.


router.post("/make/ring/out", function (req, res, next) {      var access = req.body.access;      var callInfo = req.body.callInfo;      var option = {          method: 'POST',          url: 'https://platform.ringcentral.com/restapi/v1.0/account/~/extension/~/ring-out',          headers: {              'Cache-Control': 'no-cache',              'Authorization': 'Bearer ' + access,          },          form: {              callerId: {                  phoneNumber: callInfo.callId              },              to: {                  phoneNumber: callInfo.phone1              },              from: {                  phoneNumber: callInfo.from              },              playPrompt: true,              country: {id: "1"}          }      };      request(option, function (error, response, body) {          if (error) throw new Error(error);          var bod = JSON.parse(body);              res.send(bod);              res.end();          } else {              res.send(bod);              res.end();          }      });  });


with this setup, I always get the error that I described in the title.


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

I also have the ringcentral softphone open and loaded into the same account that I have the access token for. I havent ever been able to make a successful ringOut call. So any help would be supremely appreciated!


Thanks in advance!

1 Answer
answered on Sep 22, 2018 at 10:17am  
Hi Jameson,

Is there any particular reason why you don't want to use our Node JS SDK? It is a very convenient tool we made for developers to access RingCentral platform and call APIs.

See the "Making telephony calls" section on the README file for code snippet. Remember to use the new endpoint "ring-out" instead of "ringout"

Let me know,
+ Phong



 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