Search code examples
c#dropbox-apideltadropnet

How to Use DropNet Client with UserId's received via Webhook


I am using DropBox Webhook to get the notification regarding any changes on DropBox. I'll get user id from webhook. I read there tutorial and they said that after getting user id's i have to call dropbox api on the behalf of that particular userid.

I also use DropNet nuget package for DropBox Communication. Now my question is how can i use the user id (that i'll retrieve via Webhook) to get all the changes. I know that i have to use "GetDelta" Routine but i don't know how can i create DropNet UserLogin on the basis of only "User Id" not on the basis of "User Access Token" and "User Secret Key", so that i can use "GetDelta" Routine.

Any help will be appreciated. Thanks.


Solution

  • You should be using a user access token and user secret key. On the server, you'll need to keep a mapping of user IDs to access tokens. When you see a change for a given user, you'll look up that user's access token and make calls via DropNet using that.