question

Steve Rauch avatar image
Steve Rauch asked Phong Vu commented

Can't get the browser softphone to authorize to my developer account

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.

embeddable
1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Phong Vu avatar image
Phong Vu answered

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")[0];
    rcs0.parentNode.insertBefore(rcs, rcs0);
  })();
  </script>

Make sure the login credentials are correct.

1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Steve Rauch avatar image
Steve Rauch answered

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.



screenshot-1.png (108.5 KiB)
1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Steve Rauch avatar image
Steve Rauch answered Phong Vu commented

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.


1 comment
1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Phong Vu avatar image Phong Vu ♦♦ commented ·

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

0 Likes 0 ·

Developer sandbox tools

Using the RingCentral Phone for Desktop, you can dial or receive test calls, send and receive test SMS or Fax messages in your sandbox environment.

Download RingCentral Phone for Desktop:

Tip: switch to the "sandbox mode" before logging in the app:

  • On MacOS: press "fn + command + f2" keys
  • On Windows: press "Ctrl + F2" keys