Forum Discussion

CurrentlyJason's avatar
CurrentlyJason
New member | Level 2
4 years ago

Webhooks for File Request Uploads

Hi, 

 

I have created a system that uses Dropbox as part of the automation process. The missing part is being notified when a file is uploaded to a requested file folder. I can see anywhere to configure webhooks. Do I have to create an App for this? The data sent to the webhook would need to specify the file uploaded and the request it was uploaded to. 

 

Thanks in advance for any advice 👍

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

    CurrentlyJason wrote:
    ... Do I have to create an App for this? ...👍

    Hi CurrentlyJason,

    Yes, of course! 🙂 Any API access point can be used in context of particular application performing particular task. For most access points a token denoting associated account is required also. To manage tokens you have to get familiar with OAuth 2 flow (described in documentation).

     


    CurrentlyJason wrote:
    ... The data sent to the webhook would need to specify the file uploaded and the request it was uploaded to.
    ...

    Webhook is used as a place where possible handling of any change, in any account granting access to the application, can be performed. Events CAN'T be restricted in any way!!! You have to filter them accordingly in your code! This technology is suitable for servers where web call is convenient to be delivered and handled.

    You may get interested in 2/files/list_folder/longpoll access point, too. Associated cursor can be created to follow particular set of directories (according your need), so no (or easier to implement) additional filtering would be need. Using "longpoll" let you use your application on places where incoming web call is difficult (or impossible) to perform (a type of call mandatory for webhook usage).

    You can read the documentation, find out what best fit your needs and use it. 😉

    Hope this helps.

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Staff rankDropbox Staff

    Adding on to what Здравко said, the following links may be helpful:

    Also, Dropbox doesn't offer a way to get notified of or identify which specific file request was used, but I'll pass this along as a feature request. I can't promise if or when that might be implemented though. As a workaround, if you use a distinct folder per file request, you could identify them that way when monitoring changes in general with webhooks.

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.5,953 PostsLatest Activity: 14 hours ago
354 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!