Forum Discussion

alex_rogach's avatar
alex_rogach
New member | Level 2
6 years ago

Python API - export member list

Hi guys, 

Can you share with me some examples with generating CSV or any report about all members from Dropbox admin panel.

Example for you.

Create a member data report:

  1. Sign in to dropbox.com with your admin credentials.
  2. Click Admin Console.
  3. Click Members.
  4. Click Export member data on the righthand side.
  5. Select Start export.

As you can see I need to automate this routine actions. I`m newbie in APIs and I need some parting words about it.

I`ve found some C# example and I want to know is it right direction to my goal ?

Thanks in advance.

private DropboxTeamClient DBTeamClient; 
private DropboxClient DBClient; 
…
var members = await DBTeamClient.Team.MembersListAsync();
foreach (var member in members.Members.OrderBy(a => a.Profile.Email)) 
{ 
var userClient = DBTeamClient.AsMember(member.Profile.TeamMemberId);
var list = await userClient.Files.ListFolderAsync(string.Empty);
foreach (var item inlist.Entries.OrderBy(a -> a.PathDisplay)) 
{ 
...
  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Staff rankDropbox Staff

    The "Export member data" functionality on the Dropbox Business Admin Console uses a different mechanism than the API, so there isn't a way to automate that same functionality exactly.

    If you want to programmatically retrieve information about a team's members though, using the Dropbox Business API, as you've begun here, is the right way. 

    To get the kind of information available in that csv from the Business Admin Console, you'll want to use at least the following methods:

     

About Discuss Dropbox Developer & API

Node avatar for Discuss Dropbox Developer & API
Make connections with other developers807 PostsLatest Activity: 2 days ago
218 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!