Refresh Token Dropbox Expired

Describe the problem/error/question

I’m facing an issue where the refresh token of Dropbox gets expired and I’ve got no idea how to refresh it automaticly.

I’ve followed this topics but with these the toke expires still after a while:

What is the error message (if any)?

Please share your workflow

It stops at the “Share Folders Dropbox”

Information on your n8n setup

  • n8n version: 1.85.4 (Self Hosted)
  • Running n8n via (selfhosted Railway):

hello @Daniel_StrmCtrl

Your second HTTP node has two Headers sections (one defined in the oAuth2Api credentials and another one in the node’s headers). I can’t say which one would be used, but that may be the root cause. I suppose the node’s header will have precedence over the headers.

Why you are not using the default OAuth2.0 credentials or the dropbox node (which uses the default OAuth 2.0 with predefined scopes)?

I disabled the one in the node and did a rerun. Sadly problem persists.

Reason I’m not using the Dropbox node is because it doesn’t have the sharing ability ( only has a few scopes ). I have to revert to the http one to do that. Unless I’m missing something.

Bumping it up as I still didn’t find a solution.

Last final bump - Still need help with this and haven’t found solution on my own.

What I can advice is to generate the new access token each time you are accessing the dropbox. In that case you won’t need the refresh token.

Steps would be:

  1. make a request to the /oauth2/authorize endpoint to get the auth code
  2. make a request to the /oauth2/token endpoint with that code to get the access token
  3. make a request to the desired API endpoint with the token from the 2nd step.

Otherwise, you will need to set another workflow to automatically refresh tokens (e.g. once a day)

See Dropbox OAuth Guide - Dropbox (“Using Refresh Tokens” Section)

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.