Skip to main content

I have added your javascript code to embed the softphone widget in my local hosted environment. I added the client id and client secret and standard redirect. What should the redirect look like when run in local host? Where do I make this change? When I sign in via the softphone it says I don't have permission.....Do I have to use the softphone in a server environment ? I want to use it only in a future app hosted on RingCentral. Client would run on client side (in browser) where client has direct account with RingCentral.

This is the redirect you must add to your app. It doesn't matter where you run your app ,local or on remote server, the redirect is the same as RingCentral will handle the OAuth callback.

https://ringcentral.github.io/ringcentral-web-phone/callback.html

You don't need to provide the client secret if your app is not specified to use implicit grant type flow

Simple add this to your page:

<script>
  (function() {
    var rcs = document.createElement("script");
// if login your sandbox account
    //rcs.src = "https://ringcentral.github.io/ringcentral-embeddable/adapter.js?appServer=https://platform.devtest.ringcentral.com&clientId=your-app-sb-client-id";
    rcs.src = "https://ringcentral.github.io/ringcentral-embeddable/adapter.js?clientId=your-app-prod-client-id"; 
    var rcs0 = document.getElementsByTagName("script")i0];
    rcs0.parentNode.insertBefore(rcs, rcs0);
  })();
</script>

Make sure the login credentials are correct.


OK - added this to my app with the sandbox app client id for sandbox call only:

(function() {
var rcs = document.createElement("script");
// if login your sandbox account
rcs.src = "https://ringcentral.github.io/ringcentral-embeddable/adapter.js?appServer=https:platform.devtest.ringcentral.com&clientId=ooWH7KLLQW2iDNeXOrivGw";
//rcs.src = "https://ringcentral.github.io/ringcentral-embeddable/adapter.js?clientId=your-app-prod-client-id";
var rcs0 = document.getElementsByTagName("script")[0];
rcs0.parentNode.insertBefore(rcs, rcs0);
})();


Getting this response:

{
"error" : "invalid_client",
"errors" : [ {
"errorCode" : "OAU-113",
"message" : "No redirect uri is registered for the client"
} ],
"error_description" : "No redirect uri is registered for the client"
}


Trying to use the widget configuration tool from this page:

https://github.com/ringcentral/ringcentral-embeddable/blob/master/docs/config-client-id-and-secret.md, https://ringcentral.github.io/ringcentral-embeddable/

I tried to change the parameters locally. Was not able to change redirect...Is this the right place to do this?? How will this be associated with my app? Please direct me to where I can make the changes - or can you do it?

Can I use FTP for getting and putting files to/from server. What should I be using to access my files on your sandbox server ??

Here is a screen shot:




Thank you.



Loaded the redirect you gave me into my App using the Console (sandbox app on your platform) under settings:

OAuth Redirect URI

- now get this response:

{
"error" : "invalid_grant",
"errors" : [ {
"errorCode" : "OAU-109",
"message" : "Redirect URIs do not match"
} ],
"error_description" : "Redirect URIs do not match"
}

Suggestions? Do I have to have the redirect also in the widget that shows up on my browser when running my local app? I tried in both Chrome and Firefox and get same error.



I unchecked the "implicit" form your app. Try again


Reply