Getting org/user info in client app

Is it possible to get any information about org or user in a client application without going through the login process? I'm looking for the org id and/or the user id. When the user opens my app I want to fetch a list of all users in the org. I also need to know who the current user is. The web page for this app is used across multiple orgs so I can't put the client ID in the page or a config. I need the org id to look the client id up in a database.

No, PureCloud does not expose org data to unauthenticated requests. https://developer.mypurecloud.com/api/rest/authorization/index.html

If I want to deploy a multi-tenant app to multiple customers, what's the best practice for identifying them when the page loads when they click the Apps button? The page itself doesn't have the client id. I need the client id to start the auth process I believe.

Implement one of the authorization flows linked above. Once the application is authorized, call GET /api/v2/users/me to get information about the authenticated user.

Client IDs should be hardcoded into the application.

There are also tutorials for authorization: https://developer.mypurecloud.com/api/tutorials/index.html

OK, I guess I can't do what I was hoping then. My application is a cloud based application. Everyone uses the same page. I can't create a copy of the page for every org each time someone purchases the app and then deploy it.

You don't duplicate your app. Each user authorizes your app using their own credentials from their own org. This is how the directory client works and is the fundamental concept of authorizing applications using OAuth.

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