Need username(phone number)

  • 1
  • Question
  • Updated 2 years 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 2 years ago

  • 1
Photo of Tyler Long

Tyler Long, Official Rep

  • 9,828 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"

Photo of Anton Nikitin

Anton Nikitin, Official Rep

  • 3,024 Points 3k badge 2x thumb

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.