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
API Team Messaging > Profile > Get Person how to get phoneNumbers
Tags: contacts, rest api, phone
Apr 12, 2022 at 5:59am   •   1 replies  •  0 likes
Polina Zubova

I have a user in favorites chats which I can't find by id in internal contacts https://developers.ringcentral.com/api-reference/Internal-Contacts/listDirectoryEntries and in external contacts https://developers.ringcentral.com/api-reference/External-Contacts/listContacts

Only way I can find information about this user is using https://developers.ringcentral.com/api-reference/Profile/readGlipPerson , but there is no phoneNumbers.

In ACOapp I can see phoneNumbers of the user.

So the question is how can I get phoneNumbers of such users using API?

1 Answer
answered on Apr 12, 2022 at 9:24am  

First of all, you will not get a user's phone number from the Glip Person API as phone number is not required by Team Messaging.

There are 2 kind of user types in a chat, a team or a conversation, internal user or external user. You can read the phone number(s) of an internal user using the API chain below:

1. Read your account info to get the account id (if you don't know it)

2. Read the team/chat/conversation and parse the members array to get their id

3. Read the user profile of each member using the member id

4. Compare the account id (read from step 1) with the 'companyId' in the response from step 3. If the Ids match, it is an internal user => Read the user phone number. Else => ignore external user

5. Read extension phone numbers


Hope this helps!


 1
on Apr 13, 2022 at 12:59am   •  0 likes

Hi @Phong Vu , thanks for the quick response.

Is there any way to get phoneNumbers of person not from my company?

For example,

I'm contact A from company A and I have a team with member -> contact B from company B.

From team members I know only id of contact B, using https://developers.ringcentral.com/api-reference/Profile/readGlipPerson with id I can get some information about contact B, but there is no extension and phoneNumbers.

I want to call him, is there a way how I can get his phoneNumbers using API?

on Apr 13, 2022 at 9:20am   •  -1 likes

No. As you can see form the RC app, open an external member and look at their profile, you won't see their phone number. Not only this is not supported, this should not be allowed to freely read other accounts' user phone number.

on Apr 14, 2022 at 4:06am   •  0 likes

Hi @Phong Vu , thanks for the response.

BTW it looks very strange to me, as if I login with @avaya.com user in ACO (https://app.cloudoffice.avaya.com/) which is RC app(I login with RC account there) and open team with members from different companies. I can open profile of user with @ringcentral.com(for example) and I can see phoneNumbers of this user. But through API I can't get phoneNumbers of this user.



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