Restriction on getting new refresh token while getting access token

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

Moderators: StaffingSupport, s.emmons, BullhornSupport

arockiajerald
User
Posts: 8
Joined: Fri Jul 07, 2017 1:35 pm

Restriction on getting new refresh token while getting access token

Postby arockiajerald » Tue Feb 06, 2018 6:28 am

The access token expired we make the API to bullhorn for getting new access token with old refresh token .This time bullhorn return new access token with new refresh token (as per bullhorn OAuth documentation).Is there any way to avoid getting a new refresh token? (that means my old refresh token remain active)

rmunro
User
Posts: 2
Joined: Wed Dec 31, 1969 8:00 pm

Re: Restriction on getting new refresh token while getting access token

Postby rmunro » Tue Feb 06, 2018 1:39 pm

Hi Jerald,

You would have to use the new refresh token that is provided with the response as the old refresh token will not remain active after a new token has been granted.

Regards,
Regards,

Ryan Munro
Tier 2/Enterprise Support Analyst
Bullhorn Support US: 617-478-9126
Bullhorn Support UK: 44 800 032 2848, ext. 9131
Bullhorn Support Australia: 61 28 073 5089
Bullhorn Support International: 617-478-9131

arockiajerald
User
Posts: 8
Joined: Fri Jul 07, 2017 1:35 pm

Re: Restriction on getting new refresh token while getting access token

Postby arockiajerald » Tue Feb 20, 2018 2:50 am

For the concurrent API(parallel api calls ) call i am facing refresh token invalidated issue .How to fix this ?

ColinC
User
Posts: 66
Joined: Fri Apr 08, 2016 4:54 pm

Re: Restriction on getting new refresh token while getting access token

Postby ColinC » Wed Feb 21, 2018 4:58 pm

Hi Jerald,

Only one refresh token can be valid at a time. As soon as a refresh token is used it generates a new refresh token with a login.

Kind regards,
Colin
Colin Coffman
Enterprise Support Analyst
B U L L H O R N
Staffing and Recruiting Software, On Target, On Demand
617-478-9126 (US Support)
+44 800 032 2848 ext. 9131 (UK Support)

DaveNorthCreek
User
Posts: 87
Joined: Fri Nov 20, 2015 2:04 pm

Re: Restriction on getting new refresh token while getting access token

Postby DaveNorthCreek » Mon Mar 19, 2018 5:29 pm

This has been thought about before on this forum. The solutions were
1) to have multiple simultaneous logins with all of that overhead, so each process maintains its own connection to Bullhorn, or
2) to have a singleton that supplies the Bullhorn Rest Token to all processes. On any process (client) getting a token expiry, the process makes a blocking call to the singleton to get a new BhRestToken. All other clients will expire on their next call to Bullhorn, so they will need to ask for a new BhRestToken as well, but since the first process initiated a refresh, the token they get will be current.

So you have to make sure that the singleton blocks all Bullhorn calls while doing the refresh. I would do that by making the clients ask for the BhRestToken on every call (don't cache it) and then if a refresh is needed, make them wait until the refresh returns to get the BhRestToken.

Implementation of that is language- and server-specific, but hopefully that helps.

Dave Block
North Creek Consulting, Inc.
https://northcreek.ca


Return to “REST API”

Who is online

Users browsing this forum: No registered users and 4 guests