Idle instances giving "Failed to refresh access token" after 7 days

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

Moderators: StaffingSupport, s.emmons, BullhornSupport

Post Reply
emyly88
User
Posts: 4
Joined: Sat Feb 16, 2019 6:18 am

Idle instances giving "Failed to refresh access token" after 7 days

Post by emyly88 » Sat Feb 16, 2019 7:14 am

Hello,

I have different accounts for different users for BullHorn CRM for which idle instances /connections give the error "Failed to refresh access token " after 7 days. If I re-authenticate the user's instances work normally. From what I read in the documentation http://bullhorn.github.io/Getting-Started-with-REST/ refresh tokens should not expire.
I have tested this in more batches across several accounts.(example account used jmacleod1.cloudelements )
Each time I've opened 6 connections for the same account and at 3-6 days tried twice (to confirm result) with different endpoints and worked as expected. After 7 days of being idle the connections fail and give this error "Failed to refresh access token". Could you please advise if this behavior is normal and if there is an explanation as to why this might be happening?

Thank you kindly for your time.

mholmemi
User
Posts: 3
Joined: Fri Feb 15, 2019 10:31 am

Re: Idle instances giving "Failed to refresh access token" after 7 days

Post by mholmemi » Wed Feb 20, 2019 10:30 am

Hi emyly88,

This is Mikaela with Bullhorn Support. The article below explains refresh tokens in further detail. While they do not expire after a set period of time, they do expire once you use them as this generates a new access token and refresh token.
http://bullhorn.github.io/docs/oauth/

I hope this helps! Please let me know if you have any questions.

Best,
Mikaela
Mikaela Holme-Miller | Tier II/Enterprise Support Analyst
mikaela.miller@bullhorn.com

emyly88
User
Posts: 4
Joined: Sat Feb 16, 2019 6:18 am

Re: Idle instances giving "Failed to refresh access token" after 7 days

Post by emyly88 » Wed Feb 20, 2019 1:39 pm

Hello Mikaela,

Indeed I have read the documentation. I have tested this with only one instance also fails after 7 days each time and needs re-authentication. Is there any other known behavior as to why in 7 days the connections give this error: "Failed to refresh access token". You have said that refresh tokens do expire once you use them as this generates a new access token and refresh token - is this time frame 7 days?

Please let me know if there is any other detail that would help me understand what I'm missing.

Thank you so kindly for your time. Have a great week.

emyly88
User
Posts: 4
Joined: Sat Feb 16, 2019 6:18 am

Re: Idle instances giving "Failed to refresh access token" after 7 days

Post by emyly88 » Wed Feb 20, 2019 2:29 pm

Hello Mikaela,

I'd like also to mention that by idle I mean that even though I am not using the refresh token at 7 days it is not valid to use for generating a new token.

Thank you.

mholmemi
User
Posts: 3
Joined: Fri Feb 15, 2019 10:31 am

Re: Idle instances giving "Failed to refresh access token" after 7 days

Post by mholmemi » Mon Feb 25, 2019 12:39 pm

Hi emyly88,

While the refresh tokens to do not expire, the access tokens do (perhaps this is the cause of the confusion). As a best practice, I would advise generating a new access token each time you are using the API and not leaving sessions idle.

I hope this helps! Please let me know if you have any additional questions

Best,
Mikaela
Mikaela Holme-Miller | Tier II/Enterprise Support Analyst
mikaela.miller@bullhorn.com

emyly88
User
Posts: 4
Joined: Sat Feb 16, 2019 6:18 am

Re: Idle instances giving "Failed to refresh access token" after 7 days

Post by emyly88 » Thu Feb 28, 2019 7:28 pm

Hello Mikaela,

Indeed new refresh token is returned with every new access token. The refresh token has no expiration date/time, but it does expire when a new access token and refresh token are generated. I have tested this scenario and the refresh token always expires after 7 days even though no access token has been requested. Could you confirm? Also, some of the sessions will remain idle with our customers and will need a workaround. I just wanted to confirm this behavior.

Thank you kindly for your time.

Post Reply