User API for user Details

I have two Queries

  1. How to get user Geo-location without ClientID?
  2. Is there an api to get user "title, department , email_manager" , I tried multiple, but couldn't see any.

Thanks in Advance.

Such information are available through the Users Api.
See here for the page listing all available methods: https://developer.mypurecloud.com/api/rest/v2/users/

Tile, Department are available via:

  • GET /api/v2/users/me (if you are trying to retrieve current user details - details of the logged in user)
  • GET /api/v2/users/{userId} (if you are trying to retrieve the details of another user - knowing his userId)
  • or GET /api/v2/users (if you just run a search)

Regarding the manager: the id (userId) of the manager is also available in the same request, under manager.id
You will need to run a query (like GET /api/v2/users/{userId} - using this id as the {userId}) to retrieve details of the manager (like his email, ...)

Regarding the geolocation, if you are only looking for country and city information, they are also available via the same requests. Just specify/add "geolocation" in the expand query parameter. It is then available in a "geolocation" sub-structure.
Note that if the user never allowed the web client to get access to the location (so that his location can be updated in PureCloud), the geolocation attribute/structure will not be present.

Regards,

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.