API disconnects approx. 7 days after login

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

Moderators: StaffingSupport, s.emmons, BullhornSupport

Post Reply
Posts: 1
Joined: Thu May 23, 2019 11:47 am

API disconnects approx. 7 days after login

Post by ETonchev »

Our website allows our clients to log into their Bullhorn account through our "Marketplace" after which we store the tokens we receive in our database. These tokens are used frequently during the day, performing read/write operations, meaning they are also refreshed quite often and no problems arise during that process.

An issue however that we currently have is that approximately a week after our client logs into their account, when a request is made to refresh the token we get:
"error" : "invalid_grant",
"error_description" : "Invalid, expired, or revoked refresh token."

From that point onward the client's tokens cannot be used anymore. What this means for us is that once a client logs in their Bullhorn they get essentially disconnected after a week. What could be the cause of this?

We are located in the UK and refresh our tokens by using:
https://auth-emea.bullhornstaffing.com/ ... ecret=XXXX
Bullhorn Support Staff
Posts: 936
Joined: Wed Dec 31, 1969 8:00 pm

Re: API disconnects approx. 7 days after login

Post by pmularski »

Greetings Etonchev,

It is definitely not best practice to tie a login to a given API token. Those tokens are not permanent, and doing so will result in the scenario you are experiencing.

If possible, the token should be generated after login is validated. With that said, you may receive more practical coding advice from other users on this channel.
Patrick Mularski
Senior Enterprise Support Analyst
Staffing and Recruiting Software, On Target, On Demand
Bullhorn Support Contact Numbers
US: 617-478-9126
UK: 44 800 032 2848
Australia: 61 28 073 5089
International: 617-478-9131
Post Reply