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
RestClient does not contain AuthorizeUri
Tags: sdk, api auth
Apr 8, 2021 at 9:29am   •   1 replies  •  0 likes
Lisa Xu

I follow guide:

https://developers.ringcentral.com/guide/authentication/quick-start#c#


I got following compile error:

C:\Projects\Demo\authorization-demo\my-project\Startup.cs(46,29,46,41): error CS1061: 'RestClient' does not contain a definition for 'AuthorizeUri' and no accessible extension method 'AuthorizeUri' accepting a first argument of type 'RestClient' could be found (are you missing a using directive or an assembly reference?)

1617899079361.png


Is the code out date, what is new code?


1 Answer
answered on Apr 8, 2021 at 10:01am  

It is out date. C#.net SDK released 5.x which was a major upgrade: https://medium.com/ringcentral-developers/ringcentral-net-sdk-5-0-and-its-extensions-2992a5dc5caa


You need to use this extension to build oauthUri:

https://github.com/ringcentral/RingCentral.Net/tree/master/RingCentral.Net.AuthorizeUri


Replace

var oauthUri = rc.AuthorizeUri(RINGCENTRAL_REDIRECT_URL);

with

var authorizeUriExtension = new AuthorizeUriExtension(...);
await rc.InstallExtension(authorizeUriExtension);
var oauthUri = authorizeUriExtension.BuildUri(new AuthorizeRequest{    
    redirect_uri = RINGCENTRAL_REDIRECT_URL
});


We will upgrade docs as soon as possible.


 1
on Apr 12, 2021 at 2:35pm   •  0 likes

Please let me know when to doc has been upgraded



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