Question

Retrieve all user details with attributes (email, extensions)

  • 18 November 2019
  • 1 reply
  • 1169 views

How can I access all users through API? I have an admin user and I can see all users listed on UI when i logged in as a user in the Ringcentral portal.

When I want to achieve the same functionality through API, First I do not see any availability of 'client_credential' flow. I see only 'password' flow when I select no UI option.

When I call following API

https://platform.devtest.ringcentral.com/restapi/v1.0/account/~/extension/~

It gives only main admin user details with the extension. I was expecting all the extension details here.

If I pass extension explicitly then I can get data for other extensions (and assigned user) details. For example, if there are 2 extensions - 1234, 4567 - I need to call v1.0/account/~/extension/4567 to get the details.

My need is that I need to find active calls of a user based on email id. Active call details can be fetched for an extension only.

I was hoping to get all users' information - scan their email ids and find appropriate extension -> and then call the Active call API. I am stuck at getting all user information step only at this point.

Thanks in advance for any hint, please.


1 reply

Userlevel 1

You said "client_credential" flow, do you refer to the OAuth (3 legged authentication)? If yes, check out this quick start and choose your programming language.


As an admin, you can read all extensions by using the Get Extension List endpoint. The response contains an array of records with each record contains an extension info. The email and other info is under the contact object.

If you want to map an active call with an extension's email, you have to read all extensions with the API mentioned above, keep their email and id in a list then use the id to match an active call "extensionId" (under the "from" or the "to" object depending on the direction of that active call)


Hope this helps.

Reply