OAuth - Getting user details after successful login

Forum for users and developers of Bullhorn's API service.

Moderators: StaffingSupport, s.emmons, BullhornSupport

Post Reply
connectleader
User
Posts: 4
Joined: Thu Jun 06, 2013 8:58 am

OAuth - Getting user details after successful login

Post by connectleader » Thu Jun 06, 2013 9:02 am

I was able to get the OAuth working to the point where I get the session token (and also from there, the BhRestToken) for the REST API authentication process. So far, so good.

The issue I have now is that I don't currently have a way to know which Bullhorn user is logged in, because I don't know their login name, full name, email address, etc. And since our application needs to track its actions for different users, just authentication will not help.

So, is there a way to obtain the details of the current user after successful authentication.

s.potnis
User
Posts: 16
Joined: Wed Dec 31, 1969 8:00 pm

Re: OAuth - Getting user details after successful login

Post by s.potnis » Fri Jun 07, 2013 11:10 am

Hello connectleader,

Unfortunately there isn't a way to make a call and retrive information about the current user. REST does not have the ability to do this yet.

Thanks,

Soniya Potnis
Enterprise Support Analyst
Connect | Twitter | LinkedIn

BULLHORN® | Follow Us

connectleader
User
Posts: 4
Joined: Thu Jun 06, 2013 8:58 am

Re: OAuth - Getting user details after successful login

Post by connectleader » Fri Jun 07, 2013 5:10 pm

Thank you. Is this possible using the SOAP API?

Alliance
User
Posts: 40
Joined: Mon Feb 18, 2013 12:16 pm

Re: OAuth - Getting user details after successful login

Post by Alliance » Tue Jun 11, 2013 11:30 am

Yes, upon successful return from the startSession() call, you'll have access to the userID of the current user. Using that you can get name, email address, etc.

c.choy
User
Posts: 49
Joined: Wed Dec 31, 1969 8:00 pm

Re: OAuth - Getting user details after successful login

Post by c.choy » Wed Jun 19, 2013 1:22 pm

Yes, Soap provides the userID. In either, since you would have the username (to either login via rest or startsession with soap), you would be able to do a query on CorporateUser where the username equals that and that would provide for the id number if you need for details of the user.

mpeterson
User
Posts: 5
Joined: Fri Aug 16, 2013 8:18 am

Re: OAuth - Getting user details after successful login

Post by mpeterson » Mon Aug 26, 2013 9:33 am

You can get the userId in a REST call. The following call returns the userId of the currently logged in user:

/setting/userId

Post Reply