Skip to main content

I am trying to make a ringout call using the ringcentral API. The request body I am passing is like this :


{ "to": {"phoneNumber": "91*******"},

"from": {"phoneNumber": "91*******"},

"callerId": {"phoneNumber": "91*******"},

"playPrompt": true

}


The response I am getting is :


{ "message": "Forbidden", "errorCode": "InternationalProhibited" }


The same call when I try to make with the ringcentral account is successful. Can u tell me what's wrong with that.

This is expected behavior. Since we offer free service for developers on Sandbox, international calling is prohibited there.
If you want to call US numbers, you should specify phone number in E.164 format (starting from country code, "1" in case of US). 
Hey Anton,

When I try to make the international call using the ringout image provided at the top of the account, it is successful, but the same is not happening with the API. So, the international calls are banned only for  the API???? Further, can u tell me then how I can test the ringout and other features of the ringcentral API as I am not a resident of the US.

Thanks!!! 
Sumit, do you mean that you can make international calls in Sandbox (via service.devtest.ringcentral.com)?

Probably you are talking about Production account (service.ringcentral.com), while you are using API against Sandbox.

In order to test calls and other features you can add up to four US numbers on your Sandbox account, connect Softphone, and take your calls using it. 
Hey Anton, 

Thanks for the reply. Yeah you were right , that was the production account. So, to test calls and other features from my sandbox account, I can add local us numbers at a max of 4 and then using two of the numbers, one for ringout and the other one to pick up the call , right ???
And, I tried adding the local numbers in my sandbox account, it asked to select the state and area, but everytime it was showing the "number not available. select a different area". I tried a lot of areas , but none of them worked. Can u tell me how to do that ????

Thanks!!!!
Please try 585 (NY) and 732 (NJ) area codes.
Hey Anton,

Thanks a lot. 585(NY) worked, 732(NJ) not working.
Hey Anton, 

I am trying to access my sandbox account using the desktop app. I have created the config.ini txt file into the Contents folder that was required for accessing the sandbox account. but I am still getting the "invalid credentials" error. But, I am able to login to my production account. Is there anything I am missing ????

Thanks!!!
Hi Sumit,

Look into the link below to configure your RingCentral for Desktop Application :

https://developer.ringcentral.com/library/tutorials/test-account.html

Kindly use the mentioned server in the config.ini file while you access with different accounts :

Sandbox : PlatformServer = "https://platform.devtest.ringcentral.com";

Production : PlatformServer = "https://platform.ringcentral.com";

Hey Anil,

I have already mentioned the platformServer in the config.ini file. But,it's still not working. I am able to login to my production account, but not to my sandbox account i.e "https://service.devtest.ringcentral.com"
Please make sure you are adhering to these guidelines:

  • Restart the "Ringcentral for Desktop" application each and every time you make in changes to your "config.ini" file.
  • For Production account use RC Production Account credentials ( optional : extensions )
  • For Sandbox account use sandbox account credentials ( optional : extensions )

Hey Anil,

I have created the config.ini txt file in the Contents folder. Then, I restarted the app and enter the login credentials corresponding to my sandbox account "service.devtest.ringcentral.com". But, still getting the "invalid credentials error".When I am entering the credentials for my production account "service.ringcentral.com", It is successful. What's happening ???

The config.ini might  end up having .txt extension. Make sure *.ini is being set while saving the file. Make sure this file is placed in the App Folder.  

Copy-paste this in your config.ini file:

HttpRegServer = "http://agentconnect.devtest.ringcentral.com";
PlatformServer = "https://platform.devtest.ringcentral.com";

For more info look into this link: https://developers.ringcentral.com/library/tutorials/test-account.html 


Thanks Anil and VB, it's working

Reply