Reputation: 1298
While trying to make a call using the RingCentral Platform RingOut API resource, the API responds with 200 and the message says "In Progress", but the call never actually happens. While trying to make sure it wasn't my code, I tested making a RingOut call using the RingCentral Soft Phone, and had the same problem.
RingOut
in the API Permissions for the app respectivelyaccess_token
from the Sandbox API https://platform.devtest.ringcentral.comRingOut
is included as part of the scope
Here is the API Request I am sending to the Sandbox RingOut API:
POST /restapi/v1.0/account/~/extension/~/ringout HTTP/1.1
Host: platform.devtest.ringcentral.com
Authorization: Bearer {{MY_ACCESS_TOKEN}}
Content-Type: application/json
Accept: application/json
Cache-Control: no-cache
{
"from": {
"phoneNumber":"{{MY_MAIN_COMPANY_NUMBER}}"
},
"to": {
"phoneNumber":"{{MY_MOBILE_NUMBER}}"
}
}
This fails in the RingCentral API Explorer as well, so I know it is not my code. What am I doing incorrectly?
Upvotes: 1
Views: 177
Reputation: 1298
Make sure the RingCentral Soft Phone is configured to operate with the Sandbox APIs. Read Configure Dev Environment in the Getting Started Guide to learn how to setup your Soft Phone to use the Sandbox APIs.
Once you know the Soft Phone is configured for the correct environment (Sandbox or Production), the most common reason this happens is RingCentral User you authenticated with which does not have a Direct Number or Digital Line configured.
The first step to resolving this blocker depends upon your RingCentral Account type...
Contact your RingCentral Account Administrator and ask them to add a Digital Line to the Sandbox Account User used while obtaining your access_token
. You can also switch the credentials to a sandbox account user who already has a Direct Number or Digital Line configured on their account.
-OR-
You can use the steps below (if you have an administrator role assigned to your user in RingCentral).
A. Login to your Sandbox RingCentral Account, and then Add a Digital Line on your User
Note: A digital line is just adding a phone that is set to be a "Desktop Soft Phone".
-OR
B. If you have access to administrate your Sandbox RingCentral Account, and then Add a Direct Number on your User
The second step to resolving this blocker depends upon how you are attempting to make the RingOut, using the API or using the Soft Phone.
Once you modify the user to have a Digital Line, re-authenticate to the RingCentral Soft Phone, and you should be able to make a call immediately.
Modify the body in your POST request to the RingOut API to Make a Call and set the from.phoneNumber
to equal the new Digital Line phone number you received. Then you should be able to make your call using RingOut via the API (provided you do not receive any other errors).
POST /restapi/v1.0/account/~/extension/~/ringout HTTP/1.1
Authorization: Bearer {{YOUR_VALID_ACCESS_TOKEN_WITH_RINGOUT_SCOPE}}
Content-Type: application/json
Accept: application/json
{
"from": {"phoneNumber": "{{REPLACE_WITH_YOUR_NEW_DIGITAL_LINE_PHONE_NUMBER}}"},
"to": {"phoneNumber": "{{CONTACT_PHONE_NUMBER}}"}
}
Upvotes: 1