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: 

Get Quota/ vb.net DropboxClient API

Get Quota/ vb.net DropboxClient API

Boris22
Explorer | Level 3
Go to solution

Hi, 

 

since one year i use a small "tool" to upload my files to DB periodically.

Getting used space works fine too, but how can i request the total quota / remaining free space?

 Dim box = Await dbx.GetSpaceUsageAsync()

But i dont see a suitable namespace / attribute to get my needed value.

 

I just checked the documentation but the allocation object doenst have some like quota or free space.

 

Can anybody help me out?

 

Best regards

Boris

1 Accepted Solution

Accepted Solutions

Greg-DB
Dropbox Staff
Go to solution

The GetSpaceUsageAsync method gives you a SpaceUsage object, which has Used (the amount of space used) and Allocation (the total storage quota) properties for the user.

 

So, you can do something like this (depending on account type):

 

var space = await this.client.Users.GetSpaceUsageAsync ();
Console.WriteLine ("{0}/{1}", space.Used, space.Allocation.AsIndividual.Value.Allocated);

View solution in original post

3 Replies 3

Mark
Super User II
Go to solution
*moves to correct forum*

 


:penguin::penguin: - :penguin: - :penguin: - :penguin:


Heart Did this post help you? If so please mark it for some Kudos below. 


:white_check_mark: Did this post fix your issue/answer your question? If so please press the 'Accept as Solution' button to help others find it.


:arrows_counterclockwise: Did this post not resolve your issue? If so please give us some more information so we can try and help - please remember we cannot see over your shoulder so be as descriptive as possible! 


 

Greg-DB
Dropbox Staff
Go to solution

The GetSpaceUsageAsync method gives you a SpaceUsage object, which has Used (the amount of space used) and Allocation (the total storage quota) properties for the user.

 

So, you can do something like this (depending on account type):

 

var space = await this.client.Users.GetSpaceUsageAsync ();
Console.WriteLine ("{0}/{1}", space.Used, space.Allocation.AsIndividual.Value.Allocated);

Boris22
Explorer | Level 3
Go to solution
Dear Greg,

you are my hero of the day 😉
Thanks a lot, it works fine.

Thank you very much
Boris
Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Boris22 Explorer | Level 3
  • User avatar
    Greg-DB Dropbox Staff
  • User avatar
    Mark Super User II
What do Dropbox user levels mean?