News & Announcements User Community Developer Community

Welcome to the RingCentral Community

Please note the community is currently under maintenance and is read-only.

Search
Make sure to review our Terms of Use and Community Guidelines.
  Please note the community is currently under maintenance and is read-only.
Home » Developers
Can't get the browser softphone to authorize to my developer account
Tags: softphone embeddable
Oct 9, 2020 at 10:33am   •   3 replies  •  0 likes
Steve Rauch

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.

3 Answers
answered on Oct 10, 2020 at 1:16pm  

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.



 0
on Oct 10, 2020 at 4:59pm   •  0 likes

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

answered on Oct 10, 2020 at 9:21am  

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.



 0
answered on Oct 9, 2020 at 4:53pm  

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.


 0



A new Community is coming to RingCentral!

Posts are currently read-only as we transition into our new platform.

We thank you for your patience
during this downtime.

Try Workflow Builder

Did you know you can easily automate tasks like responding to SMS, team messages, and more? Plus it's included with RingCentral Video and RingEX plans!

Try RingCentral Workflow Builder

PRODUCTS
RingEX
Message
Video
Phone
OPEN ECOSYSTEM
Developer Platform
APIs
Integrated Apps
App Gallery
Developer support
Games and rewards

RESOURCES
Resource center
Blog
Product Releases
Accessibility
QUICK LINKS
App Download
RingCentral App login
Admin Portal Login
Contact Sales
© 1999-2024 RingCentral, Inc. All rights reserved. Legal Privacy Notice Site Map Contact Us