Take Your Search Game to the Next Level with Dropbox Dash 🚀✨ Curious how it works? Ask us here!
Forum Discussion
ankushkatiyar
6 years agoExplorer | Level 3
Issue with access files
Hello i want to access changed files in dropbox , so i created a webhook
https://dpintegration.herokuapp.com/webhook |
and also i got data according to instruction mentioned in webhooks section
{ list_folder: { accounts: [ 'dbid:AACWK8UMlcqEvIjOCfL8gQrmy1uJvS8zzlE' ] },delta: { users: [ 542524594 ] } }
and i'm not using "Dropbox Business API" , i'm using "Dropbox API" .
and according to instruction mentioned in webhook section we need to use
Note that only the user IDs and accounts with file changes are provided. Your app is expected to call /files/list_folder/continue to find out what files changed using the latest cursor your app previously stored for that account. If your app is still using v1, you can call /delta.
But when i'm using api call /list_folder i got all files and folders , and when i use "Dropbox-Api-Select-Admin" in Header than i got "Error in call to API function "files/list_folder": Unexpected select user header. Your app does not have permission to use this feature" , so i need to use business api for access files ?
Need solution for this problem how i get changed files by user , please provide me perfect solution for access this
Thanks
4 Replies
Sort By
- ankushkatiyarExplorer | Level 3
Also i collect latest curser using https://api.dropboxapi.com/2/files/list_folder and than i call https://api.dropboxapi.com/2/files/list_folder/continue, so i get all files that changed after pick curser and i use token in header .
So what is use of{ list_folder: { accounts: [ 'dbid:AACWK8UMlcqEvIjOCfL8gQrmy1uJvS8zzlE' ] },delta: { users: [ 542524594 ] } }
we get from webhook post request ?
because we got data directly using token.
Suppose we upload 50 files so via get we get 50 files https://api.dropboxapi.com/2/files/list_folder/continue ( using previous cursor ), if i want to get current modified file so i need to store previous cursor first and than use api call ?
For this process we need to use{ list_folder: { accounts: [ 'dbid:AACWK8UMlcqEvIjOCfL8gQrmy1uJvS8zzlE' ] },delta: { users: [ 542524594 ] } }
- Greg-DB
Dropbox Staff
First, to clarify, if you're only using a Dropbox API app, not a Dropbox Business API app, you should not use the "Dropbox-API-Select-Admin". You can access the Dropbox API endpoints, such as the list_folder endpoints, without that header.
The basic flow for using webhooks with list_folder would go like this:
- the user connects to the app for the first time
- the app stores the access token for that user, identified by the Dropbox account ID
- the app starts listing the files and folders for the user using /2/files/list_folder and /2/files/list_folder/continue as necessary
- the app stores the last returned cursor for that user, identified by the Dropbox account ID
- the user leaves and some time passes
- the user makes changes elsewhere
- Dropbox sends the webhook notification for that user with the relevant account ID to the app's webhook URI
- the app receives the webhook notification for that user and looks like up the access token and last received cursor for that account ID
- the app calls /2/files/list_folder/continue with that access token and cursor to get the latest changes
- ankushkatiyarExplorer | Level 3the app receives the webhook notification for that user and looks like up the access token and last received cursor for that account ID
From webhook notification i onlt got account id and delta user, so where i need to use these information ??
I got access token from token api after authentication and i use this key for list_folder and list_folder/continue
I got files changes when i use api , but i want to know where i need to use webhook information that i received .
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.6,001 PostsLatest Activity: 11 hours ago
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!