Skip to content

Adding a Dropbox Channel

What You Need First

RequirementWhy You Need It
A Dropbox accountUsed to sign in and authorize the app
A Dropbox appUsed to generate the App Key and App Secret
Your ImgBed domainUsed for the OAuth redirect URI
Available Dropbox storageUsed as the actual file storage location

Setup Steps

Step 1: Create a Dropbox App

  1. Open the Dropbox App Console:
text
https://www.dropbox.com/developers/apps
  1. Create a new app.
  2. For access type, choose:
text
App folder
  1. Give the app a name you can recognize, such as imgbed-app.
  2. Open the app details page after it is created.

Recommended access type:

Access TypeRecommendation
App folderRecommended. It matches how ImgBed stores files.
Full DropboxNot recommended. ImgBed does not need full-account access.

Create Dropbox app

Step 2: Add the Redirect URI

In the Dropbox app details page, find the OAuth or Redirect URI settings and add:

text
https://your-domain.com/api/oauth/dropbox/callback

If you use the admin panel from more than one domain, add each matching callback URL.

Configure redirect URI

Step 3: Configure App Permissions

Open the Permissions tab and enable at least these scopes:

ScopeRequiredPurpose
account_info.readRequiredReads account and quota information
files.metadata.readRequiredReads file and folder metadata for path checks
files.metadata.writeRequiredCreates folders and writes metadata
files.content.writeRequiredUploads files. Missing this scope causes required scope 'files.content.write'.
files.content.readRecommendedAllows download, preview, and temporary file links

After selecting the scopes, click Submit at the bottom of the page.

Add permissions

Important:

SituationWhat To Do
You changed scopesRun the token authorization flow again and get a new Refresh Token.
You did not reauthorizeThe old token will not gain the new permissions, so uploads may still fail.

Step 4: Copy the App Credentials

Save these two values from the Dropbox app page:

Dropbox FieldImgBed Field
App keyApp Key
App secretApp Secret

Step 5: Fill in the Dropbox Channel

In Upload Settings, choose Dropbox and fill in:

ImgBed FieldWhat To Enter
Channel nameA name you can recognize, such as Main Dropbox
App KeyThe Dropbox App key
App SecretThe Dropbox App secret
Refresh TokenLeave it empty for now
Root directoryOptional. Defaults to imgbed.
NoteOptional

Get token

Step 6: Get the Refresh Token

  1. In ImgBed, click Get Token.
  2. Sign in to the Dropbox account you want to connect.
  3. Approve the authorization prompt.
  4. The callback page will show a Refresh Token.
  5. Copy it.
  6. Return to ImgBed and paste it into the Refresh Token field.

Copy token

How To Verify It

CheckExpected Result
Channel cardThe Dropbox channel appears after saving.
Channel switchThe channel can be enabled.
Token savedThe detail page shows that the Refresh Token has been saved.
Upload testA test image appears in the Dropbox app folder.

If quota limits are enabled, click quota query. After a successful query, the channel card shows used space, total space, and the last update time.

Quota query success

Troubleshooting

ProblemFix
ImgBed says the configuration is incompleteCheck that App Key, App Secret, and Refresh Token are all filled in.
Authorization succeeds but no Refresh Token appearsClick Get Token again and make sure the offline authorization flow is used.
Upload fails with required scope 'files.content.write'Enable files.content.write, click Submit, then get a new Refresh Token.
Callback failsConfirm the redirect URI is https://your-domain.com/api/oauth/dropbox/callback.
Files cannot be foundConfirm the Dropbox app was created in App folder mode.

Quick Flow

text
Open Dropbox App Console
-> Create an app
-> Choose App folder access
-> Add https://your-domain.com/api/oauth/dropbox/callback
-> Enable account_info.read / files.metadata.read / files.metadata.write / files.content.write
-> Optionally enable files.content.read
-> Click Submit
-> Copy App Key and App Secret
-> Fill them into ImgBed
-> Click Get Token
-> Copy the Refresh Token from the callback page
-> Paste it back into ImgBed and save

References

  1. Dropbox App Console: https://www.dropbox.com/developers/apps
  2. Dropbox OAuth Guide: https://developers.dropbox.com/oauth-guide
  3. Dropbox Developer Guide: https://www.dropbox.com/developers/reference/developer-guide

Released as user documentation for CloudFlare ImgBed.