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
vineet
5 years agoExplorer | Level 3
webhooks notification
we have reviced the notification json format, but how can get actual file chnages.
- 5 years ago
When you first store the access tokens and cursors in your app (e.g., in your database), you should record which Dropbox account ID each one belongs to. (For any given access token, you can use /2/users/get_current_account to check the account ID, which just needs to be done once each.)
Then, when you get the webhook notification, you can use the account ID to look up the corresponding access token and cursor.
Greg-DB
Dropbox Staff
The webhook notification payload will tell you which account has had changes, so you can then use the corresponding access token for that account to call /2/files/list_folder[/continue] (or corresponding methods in whatever SDK/library you're using, if any) to see what exactly changed.
vineet
5 years agoExplorer | Level 3
We are using from postman https://api.dropboxapi.com/2/files/list_folder/get_latest_cursor
parameter
{"path": "","recursive": true,"include_media_info": false,"include_deleted": false,"include_has_explicit_shared_members": false,"include_mounted_folders": false,"include_non_downloadable_files": true}
response is getting
{
"cursor": "AAEbjtW3suBBNRBPGmOMSPj69WGB4_TV4EkxUdP2r_W3uI4SuAsMX7tdrFy9UQ-s8ZC74h8HNo_0f6mGTXqx8zUA_gkjGsh9aZ7o6ch-wTbG-1eXrJtoMrXS5nkG2oIYFAhUxApWIpTB9OkiFewCgw3Ar5MgJRfZ6b2WuIhoJ5vYe8Txb-_N-sMapbzUh5DiZVhyoTeT-76BwIZX_7XEoAgr1CmnxA1HJQfqVpY9Fip5dA"
}
after the response API , we are using second API https://api.dropboxapi.com/2/files/list_folder/continue for get the latest changes
request
{"cursor": "AAEbjtW3suBBNRBPGmOMSPj69WGB4_TV4EkxUdP2r_W3uI4SuAsMX7tdrFy9UQ-s8ZC74h8HNo_0f6mGTXqx8zUA_gkjGsh9aZ7o6ch-wTbG-1eXrJtoMrXS5nkG2oIYFAhUxApWIpTB9OkiFewCgw3Ar5MgJRfZ6b2WuIhoJ5vYe8Txb-_N-sMapbzUh5DiZVhyoTeT-76BwIZX_7XEoAgr1CmnxA1HJQfqVpY9Fip5dA"}
response
{
"entries": [],
"cursor": "AAFtk_vDugrNpHMohiYXcyZi0NpVVlc79RjfB7M5Zu7zfI0DojtbSf3Yw8pah-oqBda83532H7G2GoEXP_e2UrWwvCaZAWcHysfkfuOll9sZntVn2TYMem84VMa_CQpKZMpyYvMFZwi3OMgnMtRUwZ_t1yRGAyPbuBf6P9NkuEpkf6Qzqbc-JRPvJwlip03iI18E-_NZmYcsuaRw6zpWvDyBTZCwKBvSwoa0c9C-bClHJhSe_G5AHLDw2O_nYyv9plM",
"has_more": false
}
We have change the folder name and file name and munual file upload on dropbox , current get the reciving the notification like this
{"list_folder": {"accounts": ["dbid:AADsKehzrQqxnG4GnclQAYU2mU0ER_f9vOw"]}, "delta": {"users": [2399690544]}}
i am using current linked account access token form APP console,
did't get any latest chnages file and folder after the hiting https://api.dropboxapi.com/2/files/list_folder/continue did not get any resoonse everytime getting response is empty like this
{
"entries": [],
"cursor": "AAFtk_vDugrNpHMohiYXcyZi0NpVVlc79RjfB7M5Zu7zfI0DojtbSf3Yw8pah-oqBda83532H7G2GoEXP_e2UrWwvCaZAWcHysfkfuOll9sZntVn2TYMem84VMa_CQpKZMpyYvMFZwi3OMgnMtRUwZ_t1yRGAyPbuBf6P9NkuEpkf6Qzqbc-JRPvJwlip03iI18E-_NZmYcsuaRw6zpWvDyBTZCwKBvSwoa0c9C-bClHJhSe_G5AHLDw2O_nYyv9plM",
"has_more": false
}
please suggest me where i am worng
- Greg-DB5 years agoDropbox Staff
To clarify, are you calling /2/files/list_folder/get_latest_cursor before or after you received the webhook notification?
The order should look like this:
- Call /2/files/list_folder/get_latest_cursor to get the latest cursor for the account using the access token for the account and save the returned cursor.
- Make changes in the account.
- Receive the webhook notification from Dropbox for the account.
- Call /2/files/list_folder/continue using the cursor received in step 1 and the same access token.
- vineet5 years agoExplorer | Level 3
Thnaks, for the fast response
i want to ask question
we have recived Cursor response from Get lateat cursor API and save cursor data into database andI have recived the notification and the save the notification json format into database
How can get User details from which API
{"list_folder": {"accounts": ["dbid:AADsKehzrQqxnG4GnclQAYU2mU0ER_f9vOw"]}, "delta": {"users": [2399690544]}}
please suggest me
- Greg-DB5 years agoDropbox Staff
When you first store the access tokens and cursors in your app (e.g., in your database), you should record which Dropbox account ID each one belongs to. (For any given access token, you can use /2/users/get_current_account to check the account ID, which just needs to be done once each.)
Then, when you get the webhook notification, you can use the account ID to look up the corresponding access token and cursor.
- RJ773 years agoNew member | Level 2
Followed the exact steps still getting entries=[]
- Greg-DB3 years agoDropbox Staff
RJ77 The webhook notification indicates that the account has had changes somewhere in the account, so you can then use the corresponding access token for that account to call /2/files/list_folder[/continue] (or corresponding methods in whatever SDK/library you're using, if any) to see what exactly changed.
So, make sure you're using an access token for the correct account. Also, note that the calls to /2/files/list_folder[/continue] will be subject to the options you set (or their defaults, if you don't specifically set them) when calling /2/files/list_folder. Returned cursors retain those options. For example, if you set 'recursive=false' (or didn't set 'recursive'), and the changed item(s) were nested deeper than the 'path' you listed, you won't get those entries returned in the 'entries' list. You would need to set 'recursive=true' in that case to get those entries (or explicitly list the relevant parent folder). I recommend referring the documentation linked above as well as the File Access Guide and Detecting Changes Guide.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,910 PostsLatest Activity: 4 days agoIf 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!