I'm trying to use the Ringcentral SDK with the Auth Code flow, I have setup my Oauth Redirect Uri in the app on the developer console under App -> my app name -> settings -> Oauth Redirect Uri
I was able to get an auth code setup using my app and the tutorial from https://github.com/ringcentral/ringcentral-api-docs/blob/master/docs/team-messaging/manual/node.md
But now that I am trying to add functionality that goes past what the ringcentral-chatbot package has by using the ringcentral SDK, I'm not able to use the auth code and redirect uri to login. here is some example code.
const SDK = require('ringcentral');
const rcsdk = new SDK({
server: SDK.server.sandbox,
appKey: myClientId,
appSecret: myClientSecret,
redirectUri: redirectUri
});
const platform = rcsdk.platform();
platform.login({
code: myAuthCode,
redirectUri: redirectUri
});
When I make the login request I get the following error "Redirect URIs do not match"
I have triple checked that the Redirect Uri in the Dev console -> App -> Settings -> Oauth Redirect Uri and my redirectUri variable in code are the same, and I have checked that the request being made through the SDK seems to have the correct body of
grant_type=authorization_code&code=<my_auth_code>&redirect_uri=<my_redirect_uri>
of course I have replaced the actual auth code with <my_auth_code> and redirect uri with <my_redirect_uri>
Is there any way I can figure out where the redirect uri mismatch is?