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?
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!
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?
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.
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