I'm working on developing an integration with RingCentral's API and am using the RingCentral.NET nuget package, along with the AuthorizeUriExtension.
When attempting to call authorizeUriExtension.BuildUri(), I'm passing in the AuthorizeRequest object as expected, and filling that with a redirect uri. As this integration is currently in development, I am using ngrok to tunnel to localhost and give the API something to redirect to. Code sample below for this call.
// NOTE: _rc below is my restClient variable from RingCentral.NET
public string GetLoginUrl()
{
var authorizeUriExtension = new AuthorizeUriExtension();
_rc.InstallExtension(authorizeUriExtension);
return authorizeUriExtension.BuildUri(new AuthorizeRequest
{
redirect_uri = "https://[randomNgrokStringHere].ngrok.io/Home/Index"
});
}
On attempting this call, however, I get an error back about there being a mismatch between the redirect_uri value that I'm sending, and the Redirect URI in App > Settings > OAuth Redirect URI--even though the Redirect URI in settings is character for character identical.
I will note that previously I was having no issues with this, and all of a sudden despite the matching URI it is suddenly throwing errors that they do not match.