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

nagasayan koduri's avatar
nagasayan koduri
Explorer | Level 4
2 years ago

Add webhooks

Hi Team,

We are interested to know the information via webhook whenever our provider Jot Form adds the PDF file to my dropbox account. So that our program will get the PDF file via dropbox SDK.

Could you please guide me on how to add the webhook and also provide the sample request body when a file is added to the dropbox account?

Thanks in advance.

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

    Hi nagasayan koduri,

    Description and additional data for webhooks can be seen here.

     


    nagasayan koduri wrote:

    ...

    Could you please guide me on how to add the webhook and also provide the sample request body when a file is added to the dropbox account?

    ...


    Just keep in mind that there is no way (not yet at least) different events types or paths to be filtered while using web hooks. You will receive events for everything (add, delete, change, etc.), everywhere (all account linked to your application, if more than one) and should filter those, you want to handle, on your own.

    • nagasayan koduri's avatar
      nagasayan koduri
      Explorer | Level 4

      Hi,

      Thanks for the update.

      I found this page earlier https://www.dropbox.com/developers/reference/webhooks 

      But on this page, I did not find the complete request body to know the event type, which file got added/deleted, etc.

      If the path is not provided how can we know where the file was added? In our case, there are 1000 folders and we configured the jot form to upload the pdf to a respective folder.

      Also if there is an example in Java could you please provide that? It will be really helpful for us.

      Thanks in advance.

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

        nagasayan koduri, There are examples for different types of accounts (personal and business) of the request payload, so I have no idea why you cannot see them.

         


        nagasayan koduri wrote:

        ... to know the event type, which file got added/deleted, etc.

        ...


        There is no event type in the event notification requests! Only information for account(s) where some (or more) event(s) has happen is listed. You have to keep track of the last event happened (using list cursor) and when new event notification comes, to continue listing further. Once know affected files/folders you can check what has happened to them.

        The examples are in  Python, but I believe this shouldn't be an issue for you to "translate" them to whatever other programing language convenient for you.

        Good luck.

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.5,917 PostsLatest Activity: 11 days ago
334 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!