cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Tell us what you want to see on the Community here!
Close

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: 

webhooks notification

Highlighted

webhooks notification

Explorer | Level 3

we have reviced the notification json format, but how can get actual file chnages.

1 Accepted Solution

Accepted Solutions
Highlighted

Re: webhooks notification

Dropboxer

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.

View solution in original post

7 Replies 7
Highlighted

Re: webhooks notification

Dropboxer

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.

Highlighted

Re: webhooks notification

Explorer | 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
 
 
 
 
 
 

 

Highlighted

Re: webhooks notification

Dropboxer

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:

 

  1. 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.
  2. Make changes in the account.
  3. Receive the webhook notification from Dropbox for the account.
  4. Call /2/files/list_folder/continue using the cursor received in step 1 and the same access token.
Highlighted

Re: webhooks notification

Explorer | 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  and 

I 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 

 

 

 

 

 

 

Highlighted

Re: webhooks notification

Dropboxer

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.

View solution in original post

Highlighted

Re: webhooks notification

Explorer | Level 3

Thanks for the response Greg

 

Can i use GetAccount API , i got the response dbId for reciving notification and pass the parameter dbId into GetAccount API  so getting the response for particular user???

 

???????

 

 

Highlighted

Re: webhooks notification

Dropboxer

You can technically use /2/users/get_account to look up the account information for a particular account based on an account ID, but for the sake of efficiency I recommend instead recording the information initially as described in my previous comment.

Work Smarter with Dropbox

The way we work is changing. Share and discover new ways to work smarter with Dropbox in our community.

Sound good? Let's get started.
Who's talking

Top contributors to this post

What do Dropbox user levels mean?
Need more support?