Question

Embedded Voice oauth error

  • 20 June 2018
  • 4 replies
  • 2591 views

Following yesterdays webinar on Embedded Voice, I am trying to integrate this into our CRM. I have created test page with a copy of the example code, but i keep receiving an oauth error. Please can someone advise? Thanks in advance.


include code:

<script>

(function() {


var rcs = document.createElement("script");

rcs.src = "https://ringcentral.github.io/ringcentral-embeddable-voice/adapter.js?appKey=itC6A58EQYS0ae-w480bCg&...;

var rcs0 = document.getElementsByTagName("script")[0];

rcs0.parentNode.insertBefore(rcs, rcs0);

})();

</script>


the error code I receive is:

oauth error: Error: invalid_request

at o (app.js:1)

at t.<anonymous> (app.js:1)

at r (app.js:1)

at Generator._invoke (app.js:1)

at Generator.e.(ringcentral.github.io/ringcentral-embeddable-voice/anonymous function) [as next] (https://ringcentral.github.io/ringcentral-embeddable-voice/app.js:1:1191401)

at r (app.js:1)

at app.js:1

at new Promise (<anonymous>)

at new t (app.js:1)

at t.<anonymous> (app.js:1)

(anonymous) @ app.js:1

r @ app.js:1

(anonymous) @ app.js:1

e.(anonymous function) @ app.js:1

r @ app.js:1

(anonymous) @ app.js:1

t @ app.js:1

(anonymous) @ app.js:1

e @ app.js:1

r @ app.js:1

(anonymous) @ app.js:1

r @ app.js:1

(anonymous) @ app.js:1

e.(anonymous function) @ app.js:1

r @ app.js:1

(anonymous) @ app.js:1

t @ app.js:1

(anonymous) @ app.js:1

e @ app.js:1

(anonymous) @ app.js:1

r @ app.js:1

(anonymous) @ app.js:1

e.(anonymous function) @ app.js:1

r @ app.js:1

(anonymous) @ app.js:1

t @ app.js:1

(anonymous) @ app.js:1

(anonymous) @ app.js:1

postMessage (async)

window.oAuthCallback @ proxy.js:1

(anonymous) @ ringcentral.github.io/ringcentral-embeddable-voice/redirect.js:1


4 replies

Hi, Nick. From the error message, it seems that you provide a valid 'appKey'. Would you please check the appKey in RingCentral Developer Website. I also try with your appKey.

Got following message from RingCentral API:

{
  "error" : "invalid_client",
  "error_description" : "Invalid client: itC6A58EQYS0ae-w480bCg",
  "errors" : [ {
    "errorCode" : "OAU-153",
    "message" : "Invalid client: itC6A58EQYS0ae-w480bCg",
    "parameters" : [ {
      "parameterName" : "client_id",
      "parameterValue" : "itC6A58EQYS0ae-w480bCg"
    } ]
  } ]
}

If you just want to test the widget, you can remove configure params as following:

  (function() {
    var rcs = document.createElement("script");
    rcs.src = "https://ringcentral.github.io/ringcentral-embeddable-voice/adapter.js";
    var rcs0 = document.getElementsByTagName("script")[0];
    rcs0.parentNode.insertBefore(rcs, rcs0);
  })();

It will use default config params.
Hi


Hi, I am having problem with implicit grant flow too. 

Nick, could you please inspect the network in Chrome devtools and post the network response here?

I want to confirm that we are talking about the same issue.

Reply