You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.

Forum Discussion

CySDeveloper's avatar
CySDeveloper
Explorer | Level 3
3 years ago

List files in app folder of user

Hi,

Please help as I am sort of stuck...

I am developing a dropbox app to load files in to our system that have been dropped into an application folder by some user.

So when configuring this the user, through our frontend, connects to dropbox and accepts the app, I then store the account id and i do a call to list and store the cursor.

Within the app i use the webhook to detect changes in the application folder.

When the hook is triggered I post a message on a queue with the user accounts that have had files changed.

Then a backend process works through the messages on the queue and uses ( for each account) the list/continue with the previous cursor. So i connect to dropbox with the application ID and secret...

And this is where i am stuck:: how do I specify for what account the list/continue and the cursor is meant, i cannot seem to specify this on the call.

  • Any access token gives access to particular user content to be processed with particular access rights. It doesn't matter what type of client you have used (web or other).

    Available content is restricted to selected application access (to entire account or to application folder only). Access rights are restricted to the selected scopes, if any. That's it.

    Classical access token, used in API calls, doesn't need any additional application authentication despite of Dropbox always knows what application the particular token has been issued to. It denotes an user always. If you mean refresh token, then on refresh the application needs to authenticate again. If you are using SDK, normally you shouldn't care for that. Your SDK will take care.

     


    CySDeveloper wrote:

    ...

    Or, and this might be an answer to my question,  do i get a special access-token returned that is specifically for the application id/user combination?


    To be honest, I'm not sure what exactly you mean here. Does the above cover your question?

    • CySDeveloper's avatar
      CySDeveloper
      Explorer | Level 3

      Hi thank you for your response,

       

      I understand the option that you have given, but it is not what i want.

      If i keep the accesstoken/refreshtoken then i will have full access like the user, whereas I have asked them to accept my application with a specific set of minimized rights. So now I want to access the application folder as the application and not as that user.

      Do you have any ideas?

       

      Tnx

      • Здравко's avatar
        Здравко
        Legendary | Level 20

        CySDeveloper wrote:

        ...

        If i keep the accesstoken/refreshtoken then i will have full access like the user, whereas I have asked them to accept my application with a specific set of minimized rights....


        Not exactly. It depends on what kind of rights were given to the particular application. If the rights are to the application folder only, that folder is the root you can see and nothing else. You can't do anything outside the application folder. What kind of application you have created? Is it restricted to application folder or not?! Also what kind of scopes were associated to the application? (they are describing what the application can do)

         


        CySDeveloper wrote:

        ... So now I want to access the application folder as the application and not as that user.

        ...


        As far as I know Dropbox doesn't provide such possibility.

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

5,910 PostsLatest Activity: 3 days ago
333 Following

If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X or Facebook.

For more info on available support options for your Dropbox plan, see this article.

If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!