question

hambrise-alan5624 avatar image
hambrise-alan5624 asked anton-nikitin answered

Need username(phone number)

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. )
topic-default
1 |1000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Tyler Liu avatar image
Tyler Liu answered
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
1 |1000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

anton-nikitin avatar image
anton-nikitin answered
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.
1 |1000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.