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

Bhavana Reddy Vanga's avatar
Bhavana Reddy Vanga
Explorer | Level 4
5 years ago

Webhooks (Dropbox Business API)

When file or folder changes in the account, Dropbox webhook sends notification to the app in the form of - 

{"list_folder": {"teams": {"dbtid:AADClDNgkem9dWq1M3thVc3K4-93Cl3zWx0": ["dbmid:AADP2xgTpjhFFOMURG5yAZTOVv2T3wkrkyY", "dbmid:AAAwp8MhW85Op96vIjatg9vPYizLr8B8O68"]}}, "delta": {"teams": {"dbtid:AADClDNgkem9dWq1M3thVc3K4-93Cl3zWx0": ["dbmid:AADP2xgTpjhFFOMURG5yAZTOVv2T3wkrkyY", "dbmid:AAAwp8MhW85Op96vIjatg9vPYizLr8B8O68"]}}}

Does "teams" in the JSON body indicate that webhook notification can come from two different teams at a time or the JSON body always contains only one team ID as key?

 

I even tried using multi-admin feature, so that admin can do changes in both the teams, but didn't get two team ids in the notification from webhook.

 

Thanks.

  • Greg-DB's avatar
    Greg-DB
    5 years ago

    I don't believe we have any documentation or guarantee on when you might expect to see more than one team per notification unfortunately.

     

    If/when that happens though, it would still just be signed with the same app secret for your app. A single app can be used to connect to multiple different teams. The app key/secret wouldn't change, as they're specific to the app itself, not the team. (Separately, it's the access token that identifies the particular team.)

     

    If you do have and are using multiple different apps registered for whatever reason, and have them connected to different teams and both registered for webhook notifications, those webhook notifications would not be grouped together, and each would use the app secret for the corresponding app.

     

    And that's correct, each team member can only be a member of one team. Each team listed in the webhook notification includes a list of member IDs that have changes in that particular team. You wouldn't see the same member ID across different teams. (Apologies the documentation is a little misleading in that regard; it's just using "member_id1", etc. as a placeholder.)

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

    Yes, the webhooks format is designed to support multiple teams per webhook notification, so please make sure your implementation is written to handle that possibility. 

    • Bhavana Reddy Vanga's avatar
      Bhavana Reddy Vanga
      Explorer | Level 4

      Ok. Can I know in what scenario we would get multiple team ids in webhook notification?

      If multiple team IDs are supported in one notification then how can we authenticate the request body, I mean what app secret should be used as signing key?

       

      And how does this work, from what I understood till now a member can't be part of two teams at a time and even if we use multi-admin fetaure, admin of trusted team can just access admin console of team and can't do major changes of files or folders in team's content.

       

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

        I don't believe we have any documentation or guarantee on when you might expect to see more than one team per notification unfortunately.

         

        If/when that happens though, it would still just be signed with the same app secret for your app. A single app can be used to connect to multiple different teams. The app key/secret wouldn't change, as they're specific to the app itself, not the team. (Separately, it's the access token that identifies the particular team.)

         

        If you do have and are using multiple different apps registered for whatever reason, and have them connected to different teams and both registered for webhook notifications, those webhook notifications would not be grouped together, and each would use the app secret for the corresponding app.

         

        And that's correct, each team member can only be a member of one team. Each team listed in the webhook notification includes a list of member IDs that have changes in that particular team. You wouldn't see the same member ID across different teams. (Apologies the documentation is a little misleading in that regard; it's just using "member_id1", etc. as a placeholder.)

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

5,910 PostsLatest Activity: 2 days ago
333 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!