News & Announcements User Community Developer Community

Welcome to the RingCentral Community

Please note the community is currently under maintenance and is read-only.

Search
Make sure to review our Terms of Use and Community Guidelines.
  Please note the community is currently under maintenance and is read-only.
Home » Developers
Asp.net C# To get all incoming and outgoing calls
Tags: getting started
May 22, 2017 at 1:23pm   •   3 replies  •  0 likes
keith-stephens-fax

Is it possible to get the incoming and outgoing call logs for all users in your organization?

I am needing to get all incoming calls that were answered, and all outgoing calls for each users in our organization and show how many calls were made per day for the previous week along with a total count.

Is this possible with the API? I have downloaded the ringcentral-csharp-client-master project, but I do not know were to being or how to even connect to the api.

Any help would be great, even better a small sample app to show how to connect and pull back some log data.

Thanks,

Keith.

3 Answers
answered on May 23, 2017 at 6:10pm  
For the 400 error, please catch the exception and print the response. https://github.com/tmenier/Flurl/issues/114 http://tmenier.github.io/Flurl/error-handling/

I think it is because you didn't setup the testing project: https://github.com/ringcentral/ringcentral-csharp-client/tree/master/RingCentral.Test#setup


For RingCentral-csharp-client application, all the http requests are async, so please don't treat them as sync. 

For example:  var account =  rc.Restapi().Account().Get();

should be change to either  var account =  await rc.Restapi().Account().Get();

or  var account =  rc.Restapi().Account().Get().Result;

If you treat them as sync and set a break point, you won't be able to see any data.

 0
answered on May 23, 2017 at 1:50pm  

I have 4 individual applications that should be connecting with RingCentral but they are giving me errors.

RingCentral-csharp-client-master application. The  public AuthorizeTest(RestClientFixture fixture) test job.

When I debug this test job I get the following error.
 FlurlHttpException: Request to https://platform.devtest.ringcentral.com/restapi/oauth/token failed with status code 400 (Bad Request).
 
 My test application.

Just want to get a successful connection. I followed the install instruction.

   RestClient rc = new RestClient("Key", "Secret", "https://platform.devtest.ringcentral.com");     
            rc.Authorize("Username", "", "password");
            var extension = rc.Restapi().Account().Extension();
            var callLogs = extension.CallLog().List(new { direction = "Inbound" });
            var account =  rc.Restapi().Account().Get();

I get the following for callLogs and account
 callLogs Id = 37, Status = WaitingForActivation, Method = "{null}", Result = "{Not yet computed}"
account Id = 44, Status = WaitingForActivation, Method = "{null}", Result = "{Not yet computed}"


Through Chromes PostMon application
https://medium.com/ringcentral-developers/using-postman-with-swagger-and-the-ringcentral-api-523712f...

Gives me the following error.

{
  "error": "unauthorized_client",
  "error_description": "Unauthorized for this grant type"
}


From the test pages on the Dev site.

http://ringcentral.github.io/api-explorer/#!/Account_and_Extension_Information/v1_0_account__account...

I am running the very 1st Post call under Authentication.

/oauth/token

{
  "error": "unauthorized_client",
  "error_description": "Unauthorized for this grant type" }


 0
answered on May 22, 2017 at 6:42pm  
If you don't need real time data, you can just fetch the call logs.

Do you any specific issues following the readme file?  https://github.com/ringcentral/ringcentral-csharp-client#installation

 0



A new Community is coming to RingCentral!

Posts are currently read-only as we transition into our new platform.

We thank you for your patience
during this downtime.

Try Workflow Builder

Did you know you can easily automate tasks like responding to SMS, team messages, and more? Plus it's included with RingCentral Video and RingEX plans!

Try RingCentral Workflow Builder

PRODUCTS
RingEX
Message
Video
Phone
OPEN ECOSYSTEM
Developer Platform
APIs
Integrated Apps
App Gallery
Developer support
Games and rewards

RESOURCES
Resource center
Blog
Product Releases
Accessibility
QUICK LINKS
App Download
RingCentral App login
Admin Portal Login
Contact Sales
© 1999-2024 RingCentral, Inc. All rights reserved. Legal Privacy Notice Site Map Contact Us