jameson-bevans11907 avatar image
jameson-bevans11907 asked Phong Vu answered

Ring Out API Endpoint returns - { "message" : "Unsupported Media Type", "errors" : [ ] }

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."/make/ring/out", function (req, res, next) {      var access = req.body.access;      var callInfo = req.body.callInfo;      var option = {          method: 'POST',          url: '',          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 |3000

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

1 Answer

Phong Vu avatar image
Phong Vu answered
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

1 |3000

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

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