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
Permissions errors in API call after creating new application
Tags: rest api, permissions, get token, developer sandbox
Apr 6, 2023 at 1:43pm   •   2 replies  •  0 likes
Sierra Gold2

Hoping to get some help here as I have ran a ton of tests to confirm that this issue is not caused by something I am doing wrong. I currently have an app that makes calls to API to collect call log info. That app is working fine and is in production. Recently, I needed to add some permissions to the app and since you cannot do that in a production app, I created a new one with the same permissions as the old one and a couple more. During that process, it had also created me a new sandbox account since the one I used for the original app had expired. This new sandbox account had a new phone # and extension associated with it. Didn't seem that it would be a big deal but it is. I can request the token just fine and the response comes back with the appropriate permissions:

"access_token": "xxxxxxxxxxxxx....", "token_type": "bearer", "expires_in": 3600, "scope": "ReadMessages ReadAccounts SMS ReadCallLog",

Even doing a simple test in postman using that token to the call-log endpoint, it generates a permission error

POST:
https://platform.devtest.ringcentral.com/restapi/v1.0/account/~/call-log

Header contains the Authorization key with a value of Bearer followed by the token returned from the response above but states insufficient permissions.

"errorCode" : "InsufficientPermissions" , "message" : "In order to call this API endpoint, one of the following permissions
[ReadCompanyCallLog] have to be granted to the authorized user."
,
"errors" : [ { "errorCode" : "CMN-408" ,
"message" : "In order to call this API endpoint, one of the following permissions [ReadCompanyCallLog] have to be
granted to the authorized user."
,
"permissionsName" : "ReadCompanyCallLog" } ],
"permissionsName" : "ReadCompanyCallLog"


Not sure what the issue is here but I have tried different methods to send the post requests and nothing is working. Oddly, if I use the API explorer and use the "Try it out", it works fine but any request outside that environment is not working, aside from the app I already have it production so it just appears to affect the calls to the dev area. Any ideas?

2 Answers
answered on Apr 6, 2023 at 2:18pm  

Awesome, thank you. Yeah, I was not aware permissions had to be configured for sandbox users. I accessed the user portal for the sandbox user and changed the user role to super admin and it is working now.


 0
answered on Apr 6, 2023 at 2:07pm  

It means that you authenticate the app with a user who does not have enough user permission to access the call log at the account level. You will need to change the role of that user from "standard" (I guessed) to "super admin" role. Or create a custom role and choose the user permission as shown in the error message and assign that role to that user and authenticate the app again.


 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