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
Received "OAU-140: Invalid Resource Owner Credentials" error
Tags: ringcentral app, errors
May 2, 2022 at 6:46am   •   4 replies  •  0 likes
Sam Amir

I need to have a possibility to send sms form different users with different phone numbers. Support Team recommended me setup connection from different users. The app I`m creating is integration between RingCentral and Salesforce.

I created another test account, made the same in there and it works. In this account I got the error but all credentials are correct. I am using password from service as required.

Client Id: B6pLS5gTR4a3wseciBk2fg

on May 2, 2022 at 6:47am   •  0 likes

@Phong Vu Could you please help

3 Answers
answered on May 18, 2022 at 9:13am  

@Phong Vu

I am trying to login via 3-legged authorization but got the error with invalid credentials. All credentials are correct, also to be sure I changed the password but it didn`t help.

I made a test:
As I texted before I`ve created another account for testing and succesfully authorized with that credentails.

I had issue with phone number(I coudn`t send sms from sandbox account) with jwt authorization. Also tried before to authorize with password authorization and got similar error. All of those authorizations I tried in totally different created account and all work. But not with this account. So I suppose the issue in particular account


 0
answered on May 10, 2022 at 6:25am  

@Phong Vu I am trying to connect using 3-legged authentication and getting the following error:

"errorCode" : "OAU-165",

message" : "Sandbox client is not allowed: B6pLS5gTR4a3wseciBk2fg"

sample code I am using:

Http http = new Http();

HttpRequest req = new HttpRequest();

req.setEndpoint('https://platform.ringcentral.com/restapi/oauth/authorize?response_type=code&redirect_uri=https://sandbox5-mountainmanagementgroup.cs211.force.com/services/apexrest/AccountsList&client_id=B6pLS5gTR4a3wseciBk2fg');

req.setMethod('GET');

HttpResponse response = http.send(req);

System.debug('response.getStatus : ' + response.getStatus());

System.debug('res.getBody()' + response.getBody());


I am using correct client id, so could you help me resolve the issue


 0
answered on May 2, 2022 at 8:14am  

I don't know what you meant by saying "creating another test account.". Can you give me the test account id or its main company number?.

I see that you have 2 apps, one is in the production and one is still in the sandbox environment. The app client id "B6pLS5gTR4a3wseciBk2fg" is still in the sandbox environment. And there is only 1 user extension in your sandbox account (and that is you).

To login the app in the sandbox environment, you have to use login credentials of user(s) who are under the sandbox account. Thus, not any user under the production account.

There is also a fundamental problem in the public app which was graduated by our support engineer. You cannot have a public app with Server only/ (No UI) platform type.

I am not sure about your use case yet, but here are the options:

  1. If you want different users with different phone numbers under the SAME RINGCENTRAL ACCOUNT to use your app, you need a private app with the "Server/Web" platform type.

  2. If you want different users with different phone numbers from DIFFERENT RINGCENTRAL ACCOUNTS to use your app, you need a public app with the "Server/Web" platform type.

Let me know which option above is your use case so I can help to change your app settings accordingly.


 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