How to Handle Access Token Expiration and Refresh Token Requests in Jobber API Integration?

This topic was automatically generated from Slack. You can find the original thread here.

Hi guys, I am currently working on integrating Jobber API. I have a few questions regarding the OAuth 2.0 and Refresh Token workflow, specifically related to the issue of Jobber accounts getting disconnected after a certain period.

The challenge I’m facing is that the access token expires over time, leading to disconnections in my automated workflows. I was wondering if there is a manual way for me to request a refresh token on my end, ensuring a seamless and continuous integration with Jobber.

I would appreciate any insights or guidance you can provide on this matter. Additionally, if there are any best practices or recommended approaches to handle access token expiration and refresh token requests efficiently, I would be grateful to learn more about them.

Thanks in advance

We should be handling that refresh process for you automatically — if we’re not, maybe there’s an issue in the configuration or a bug somewhere.

But I see they aren’t defining the expiry when they issue an access_token in their OAuth flow cc

I believe when we don’t know the expiry, I think we try to refresh roughly every hour? So maybe the tokens are expiring sooner than that but they aren’t telling us when they do.

Thank you, , for your valuable input. I’ve learned that PipeDream is supposed to manage automatic token refresh for us.

However, in this specific instance, it’s not working as expected. I frequently encounter disconnections from the account, causing my workflow to fail due to an invalid token.
I’m wondering if there might be an issue with Jobber’s API.

Are there any coding workarounds that I can implement as part of the workflow steps?

I’ve reached out to the Jobber team to better understand what is happening, as I’m seeing we are getting 401 errors from their APIs when hitting the refresh token endpoint. Will keep you posted on what they say!

Great job, ! I truly appreciate all the effort you’ve put into resolving this issue.

Have you received any feedback from the Jobber team regarding the issue?

Hey Jakub, I have not - I’m cc’ing you to the thread as well now.

Hi , I’m going to test turning on long-lived refresh tokens on the app, to see if this mitigates the issue. Can you reconnect your account, and let me know if your still run into account connection issues after this?

Hi I recently reconnected my Jobber account and tested one of the workflows a few hours later. It appears to be functioning properly now, as the tokens are refreshing. Previously, all the workflows were failing due to expired tokens.
I really appreciate your cooperation. Thank you so much!

Happy to hear that it’s working without issue now Jakub!