question

bill259 avatar image
bill259 asked ·

API for Ring out.

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:

https://developer.ringcentral.com/api-docs/latest/index.html#!#RefRingOutCall.html

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?
topic-default
1 |1000 characters needed characters left characters exceeded

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

Tyler Liu avatar image
Tyler Liu answered ·
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.
Share
1 |1000 characters needed characters left characters exceeded

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

bill-fox avatar image
bill-fox answered ·
Curl
Share
1 |1000 characters needed characters left characters exceeded

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

Tyler Liu avatar image
Tyler Liu answered ·
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\":\"\"}}" \ "https://platform.devtest.ringcentral.com/restapi/v1.0/account/~/extension/~/ring-out" 

 Ref:
https://github.com/ringcentral/ringcentral-faq/blob/70ae4be20d858179e28a630d38148f9fb44fe238/docs/oa...

https://developer.ringcentral.com/api-explorer/latest/index.html#/!/RingOut/makeRingOutCallNew
Share
1 |1000 characters needed characters left characters exceeded

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

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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