cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
We recently received a question asking for advice on how to set up a Dropbox account for an elderly family member. This prompted us to think about the different ways we can make Dropbox more accessible in general, learn about it and add your tips right over here.

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: 
1
Ask
2
Reply and help

Mapping webhooks users to accounts

Mapping webhooks users to accounts

nberato
New member | Level 2

Is there any guarantee that the order of "users" and "accounts" in a webhook notification body is the same?

 

e.g. in the sample webhook notification below, does the user "12345678" correspond to the account "dbid:AAH4f99T0taONIb-OurWxbNQ6ywGRopQngc"?

 

 

{
    "list_folder": {
        "accounts": [
            "dbid:AAH4f99T0taONIb-OurWxbNQ6ywGRopQngc",
            ...
        ]
    },
    "delta": {
        "users": [
            12345678,
            23456789,
            ...
        ]
    }
}

 

3 Replies 3

Re: Mapping webhooks users to accounts

Greg-DB
Dropboxer
We don't document a guarantee for that, so I don't recommend relying on it.

What's your use case for this though? The intent is that you should only need to use one or the other. I'll be happy to send along a feature request but some additional context would be helpful.

Re: Mapping webhooks users to accounts

nberato
New member | Level 2
I'm attempting to do an online migration of an app from API v1 to v2 and it would be great to not have to do additional lookups to verify the mapping, especially since there's a limit to the amount of time to respond to a webhook.

Re: Mapping webhooks users to accounts

Greg-DB
Dropboxer

Thanks! I'll send this along.

 

For reference, as it is right now, as you migrate to API v2, to record the user ID to account ID mapping you can call /2/users/get_current_account for the known user ID to get the account ID.

Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropboxer
  • User avatar
    nberato New member | Level 2
What do Dropbox user levels mean?
Need more support?