Need username(phone number)

  • 1
  • Question
  • Updated 1 year ago
  • Answered
I am authenticating using authentication flow. i need logged in username () phone number. how to get it?(i need this because i will display logged in username to my customers. )
Photo of Hambrise Alan

Hambrise Alan

  • 140 Points 100 badge 2x thumb
  • anxious

Posted 1 year ago

  • 1
Photo of Tyler Long

Tyler Long, Official Rep

  • 6,958 Points 5k badge 2x thumb
Make an API call to "/restapi/v1.0/account/~/extension/~" 

"~" means current authorized user.

If you need the associated phone numbers with the user, send an API call to "/account/~/extension/~/phone-number"

Ref:

https://developer.ringcentral.com/api-docs/latest/index.html#!#RefGetExtensionInfo

https://developer.ringcentral.com/api-docs/latest/index.html#!#RefExtensionPhoneNumbers.html
Photo of Anton Nikitin

Anton Nikitin, Official Rep

  • 2,894 Points 2k badge 2x thumb
Hambrise,

any of the phone numbers belonging to account can be used as a username. It can be not only number belonging to particular extension but also main company number if a user provided extension number along with main number to login. It can be also email address. So I don't see much sense of displaying particular phone number which was used to login. In our own sites we usually display first and last name of a user and also main company number and user's extension number.