cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to learn some quick and useful tips to make your day easier? Check out how Calvin uses Replay to get feedback from other teams at Dropbox 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: 

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

Greg-DB
Dropbox Staff
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.

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.

Greg-DB
Dropbox Staff

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.

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
  • User avatar
    nberato New member | Level 2
What do Dropbox user levels mean?