Basecamp Oauth2.0 not refreshing

Describe the problem/error/question

For some reason I cannot figure out why the Basecamp OAauth2.0 connection is not refreshing tokens. Every time the BC Oauth is active for 2 weeks and then breaks down, if i consent again it works for 2 weeks.

In de Basecamp API documentation api/sections/authentication.md at master · basecamp/api · GitHub they say they want the refresh token url like this:

POST https://launchpad.37signals.com/authorization/token?type=refresh&refresh_token=your-current-refresh-token&client_id=your-client-id&redirect_uri=your-redirect-uri&client_secret=your-client-secret

Is this how n8n builds the url as well? or do you build another url? If so, any idea how to fix this?

What is the error message (if any)?

Error when the token is expired.

Please share your workflow

Cannot share because of delicate info

Information on your n8n setup

  • n8n version: 1.19.5
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system: Linux

Hi @timautomation, I don’t think n8n would use type=refresh out of the box when trying to refresh a generic OAuth2 token. In a first step you could try adding this query parameter to the Auth URI Query Parameters field of your OAuth2 credentials, though I am not 100% sure about this one.

Perhaps @netroy can confirm the specifics here? I know he spent a lot of time working on the OAuth2 library we have in use.

1 Like

@netroy perhaps you have an answer for me :slight_smile: Thanks!