Is there an API that tells me if the user logging in has admin privileges?

  • 1
  • Question
  • Updated 3 years ago
  • Answered
I'm also writing an app that can pull call logs from my company's account.  However, I believe call log access is limited to a user's own call logs unless the logged in user has admin privilege.

I want to throw up a message to my users so they know what their call log access scope is based on whether or not they're an admin.  Is there an API that tells me this?  Thanks
Photo of DL Mozart

DL Mozart

  • 120 Points 100 badge 2x thumb

Posted 3 years ago

  • 1
Photo of Anton Nikitin

Anton Nikitin, Official Rep

  • 2,914 Points 2k badge 2x thumb
You are right: account call logs are accessible only by administrators. You can easily understand if a user is administrator or not by just calling extension info API for this user:

GET https://platform.ringcentral.com/restapi/v1.0/account/~/extension/255537016 HTTP/1.1
HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8
Content-Language: en-US
{
  "uri" : "https://platform.ringcentral.com/restapi/v1.0/account/255537016/extension/255537016",
  "id" : 255537016,
  "extensionNumber" : "101",
  ...
  "permissions" : {
    "admin" : {
      "enabled" : true
    },
    "internationalCalling" : {
      "enabled" : true
    }
}
Photo of DL Mozart

DL Mozart

  • 120 Points 100 badge 2x thumb
Thanks Anton!