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
Issue in authorization c# SDK
Tags: sdk
Jul 19, 2017 at 12:22am   •   5 replies  •  0 likes
hardik-joshi

Hi, i am having issue with authorization when using c# SDK. i am using below code to get access token from c#.

using RingCentral;   

rc = new RestClient("appKey", "appSecret");


var tokenResponse = rc.Authorize("username", "extension", "password");


i am getting status in tokenResponse always "waitingForActivation" whether using any appKey or appSecretKey or any user name password does not matter.


every time i am getting same response in status that "waitingForActivation".


we have already install RingCentral nuget package into our project.


please help me on it


5 Answers
answered on Jul 20, 2017 at 5:57pm  
You can search this forum by keyword "grant type" and check the history issues. You are not alone.

 0
answered on Jul 20, 2017 at 7:32am  
It's probably because you selected a wrong platform type for your app. If you expect to login from your server code then choose the "Server-only" type. See this reference for more details about platform type (https://developer.ringcentral.com/library/getting-started.html#/#PlatformTypes)

Now you can create a new app with a correct platform type and try again.

+ Paco

 0
answered on Jul 20, 2017 at 3:52am  
Above mention error got changed after applying "await" now Its giving me below error

Request to https://platform.devtest.ringcentral.com/restapi/oauth/token failed with status code 400 (Bad Request).

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


 0
answered on Jul 19, 2017 at 5:57pm  
Could you please post the full response message? (Including the HTTP status code and error message code).

It's not a NuGet issue as long as you can compile your app.



 0
answered on Jul 19, 2017 at 10:22am  
It should work with the following code.

await rc.Authorize("username", "extension", "password");
// get the token if you want to
var tokenString = rc.token.access_token;

+ Paco

 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