Skip to content

Latest commit

 

History

History
27 lines (19 loc) · 861 Bytes

File metadata and controls

27 lines (19 loc) · 861 Bytes

Authorize URI extension

This extension provides utility methods to build URI for OAuth authorization purpose.

var rc = new RestClient(
    Environment.GetEnvironmentVariable("RINGCENTRAL_CLIENT_ID"),
    Environment.GetEnvironmentVariable("RINGCENTRAL_CLIENT_SECRET"),
    Environment.GetEnvironmentVariable("RINGCENTRAL_SERVER_URL")
);

var authorizeUriExtension = new AuthorizeUriExtension();
rc.InstallExtension(authorizeUriExtension);

var redirectUri = "http://localhost:3000/callback";

var uri = authorizeUriExtension.BuildUri(new AuthorizeRequest
{
    redirect_uri = redirectUri,
    state = "myState"
});

More documentation

This extension is inspired by its TypeScript counterpart, check its documentation for more information.