We’re Still Here to Help (Even Over the Holidays!) - find out more here.
Forum Discussion
dsoprea
3 years agoHelpful | Level 6
Listing members in a team via Python
So, the event we receive via webhooks to a 'full dropbox'-scoped app looks like:
[2023-09-15 22:55:42,859 wew.handler_plugins. DEBUG] Received Dropbox event:
{
"delta": {
"te...
dsoprea
3 years agoHelpful | Level 6
Yes. The clients are a thin wrapper for the API, but, nonetheless, it's what we're using to access the API and the naming is intractable, at least to an unfamiliar user. The brief examples given on the website don't mention any of the team/business semantics. They only work for non-team accounts.
Здравко
3 years agoLegendary | Level 20
dsoprea wrote:... They only work for non-team accounts.
Yes, they are designed so. As seems it's difficult for you to adapt it!? 🧐
Try to change the line:
for account in json.loads(request.data)['list_folder']['accounts']:...to something like:
teams = json.loads(request.data)['list_folder']['teams']
for team in teams:
for account in teams[team]:Everything else may stay the same (least for the test). 🙋
Hope this helps with the first steps of adaptation.
- dsoprea3 years agoHelpful | Level 6Unfortunately, it's not the same. I've already tried. The API complains about the IDs not being the right length. Presumably because these are "member IDs" not account IDs. It looks like we need to use our access-token with the "DropboxTeam" class and then switch to the member using "as_user()".
- Здравко3 years agoLegendary | Level 20
As I said before, it's your responsibility to keep all needed information!!! The only work for all those accountId is to be unique and so you be able index whatever you have stored before, nothing more. Of course you can use it whenever applicable. For the test (just to see how it's working) temporary remove all team related scopes, so only token (alone) will be enough. Issue tokens anew.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
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, Facebook or Instagram.
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!