API for Ring out.

  • 1
  • Question
  • Updated 1 year ago
I can successfully copy the following into a URL and it works. (password changed) 

https://service.ringcentral.com/ringout.asp?cmd=call&username=17274003201&; ext=7001&password=xxxxx&to=&from=17274106584&clid=7274003201&prompt=1

I was told I should use this format:


What would the complete string look like?  I do not see in the https://developer.ringcentral.com/api-docs/latest/index.html#!#RefRingOutCall.html where a password is inserted?
Photo of Bill Fox

Bill Fox

  • 150 Points 100 badge 2x thumb

Posted 1 year ago

  • 1
Photo of Tyler Long

Tyler Long, Official Rep

  • 9,828 Points 5k badge 2x thumb
Hi Bill,

What you were told to use is RingCentral Restful API. It could not be done via a single url. Instead, you need to write some code. If you tell me your programming language I can show you sample code.
Photo of Bill Fox

Bill Fox

  • 60 Points
Photo of Tyler Long

Tyler Long, Official Rep

  • 9,828 Points 5k badge 2x thumb
Curl is not a programming language but it is still possible to do it with curl.

The first step is to obtain the access token: 

curl -i -X POST "https://platform.devtest.ringcentral.com/restapi/oauth/token" \
-H "Accept: application/json" \
-H "Content-Type: application/x-www-form-urlencoded" \
-u "clientId:clientSecret" \
-d "username=username&password=password&extension=extension&grant_type=password"
With the token, invoke the RingOut API:
curl -X POST --header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer <access-token>" \
-d "{\"from\":{\"phoneNumber\":\"12345678\",\"forwardingNumberId\":\"\"},\"to\":{\"phoneNumber\":\"87654321\"},\"callerId\":{\"phoneNumber\":\"\"},\"playPrompt\":false,\"country\":{\"id\":\"\"}}" \