cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
What’s new: end-to-end encryption, Replay and Dash updates. Find out more about these updates, new features and more here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Generating refresh token offline

Generating refresh token offline

Gigueur
New member | Level 2

I have a PHP application that must send files to a Dropbox account every day. I read that I have to use refresh token offline for it to work. So I go to this url to generate the first refresh token:

 

https://www.dropbox.com/oauth2/authorize?token_access_type=offline&response_type=code&client_id=MYAP...

 

It redirect me on a Log screen and when I try to log in I have the message "Please sign in with a work account."

Do I need a business account?

 

I read this on this subject:
If you don't have a work account and only want to authorize non-team functionality, you will need to configure your app/authorization flow without the team scopes.

 

So if I buy a business account it will work or their is other meen to do it?

1 Reply 1

Greg-DB
Dropbox Staff

With an /oauth2/authorize URL like that, the "Please sign in with a work account." message indicates that the app key in the client_id URL parameter is for an app that uses some team scope(s), but the account you're signing in to is not on a team.

 

When using any team scopes, the app would be connected to the entire Dropbox team, in order to use functionality specific to Dropbox teams. Accordingly, only Dropbox team admins can authorize such apps, and the Dropbox web site would prompt you to sign in to a team account accordingly.

 

Upgrading to a team account would resolve that, but that would only be necessary if you do need access to team functionality. If you don't need any team functionality, you should instead disable any team scopes on the app. You can manage the app's scopes from the "Permissions" tab of the app's page on the App Console while signed in to the account that owns the app.

 

You can see which scope is required for each endpoint in the API documentation. You should enable only the scopes needed for the functionality in your app.

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
What do Dropbox user levels mean?