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
Getting WaitingForActivation while using c# sdk
Tags: sdk
Nov 20, 2017 at 2:50am   •   4 replies  •  0 likes
hardik-joshi

Hi,


I am using c# sdk for my server application.i have already done authorization using appKey and appSecret and user name password.


now when i am going call method to get the messages (Message List) from c# using below code.its giving me following response.


Request :


var extension = rc.Restapi().Account().Extension();


var response = await extension.MessageStore().List();


var messages = response.records;


in response i am getting below :


Id = 1487

Status = WaitingForActivation

Result = null


can you please help me solve this problem

4 Answers
answered on Nov 20, 2017 at 9:50pm  
According to this: https://stackoverflow.com/a/14527164/862862

One possible solution is to use await everywhere. Don't mixup await and .Result

 0
answered on Nov 20, 2017 at 9:48pm  
It's hard to get C# async correct. And it is often "stuck". Generally speaking it is a C# programming issue: https://www.google.com.hk/search?q=c%23+async+stuck&oq=c%23+async+stuck&aqs=chrome..69i57j69...

 0
answered on Nov 20, 2017 at 9:36pm  
Thanks Tyler for your reply. but when i am using above mention solutions. it will not giving me any response just stuck over there.

Nothing is happens when i use await keyword or writing .Result as above. it will simply stuck and not able to get any response from it



 0
answered on Nov 20, 2017 at 4:59pm  
The C# SDK is async.

  var response = await extension.MessageStore().List();

Do not omit the await keyword.

 Or you can try the following:

var response = extension.MessageStore().List().Result;

Reference: https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/async

 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