We’re Still Here to Help (Even Over the Holidays!) - find out more here.
Forum Discussion
SauravAnand01
9 years agoExplorer | Level 3
Dropbox API V2 GetAccountInfo() - C#
I'm migrating from Dropbox v1 to v2, how can i proceed with GetAccountInfo() to get details such as: UserName, UserId, QuotaUsed, QuotaAvailable, SharedUse. How do i get this with v2. Previous...
Greg-DB
Dropbox Community Moderator
9 years agoThe Dropbox API v2 .NET SDK officially supports .NET Framework 4+, so you shouldn't need to upgrade to 4.5.
How exactly did you install it? Also, can you confirm that you installed the latest version (currently v4.3.1)?
SauravAnand
9 years agoExplorer | Level 4
Hi Greg,
I have one of my winform project (framework 4.0) then added one more project name "dropboxV2" (framework 4.0) to the same solution and set this project output type as "Class Library". I went to package manager console then run "Install-Package Dropbox.Api", after completion i got "Successfully installed 'Dropbox.Api 4.3.1' to dropboxV2".
I have a class like in newly added project:
public async void GetCurrentAccount(string accessToken)
{
using (var client = new DropboxClient(accessToken))
{
var fullAccount = await client .
Users.GetCurrentAccountAsync();
}
}Now i'm accessing above method from my main project as:
dropboxV2.DropboxHelper helper = new dropboxV2.DropboxHelper(); helper.GetCurrentAccount(access_token); // here i'm getting exception
What i'm doing wrong here? Please help.
Thank you.
- Greg-DB9 years ago
Dropbox Community Moderator
Thanks! Can you try installing the SDK in both projects?
Also, I believe you'll need to at least install System.Net.Http.- SauravAnand9 years agoExplorer | Level 4No, i have managed to install Dropbox.Api v2 into my main project itself and System.Net.Http is installed too.
Thanks for your support.- Greg-DB9 years ago
Dropbox Community Moderator
Apologies, I'm not sure I follow. Did you try installing the library into both of the projects you mentioned? Is it working now?
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!