Skip to main content

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?

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.


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.


Reply