We’re Still Here to Help (Even Over the Holidays!) - find out more here.
Forum Discussion
Continuous I.
11 years agoNew member | Level 1
CSharp SDK dbx.Files.UploadAsync doesn't work
Hi,
I've installed the CSharp DropBox SDK in a Console App (in part of my CI toolchain, although created in Visual Studio 2013 it is sitting in a Xamarin solution that is built using Jenkins on Mac...
Continuous I.
11 years agoNew member | Level 1
Thanks Qiming, with a slight adjustment to that, the errors are now indeed throwing properly, I'll put my main function here and then the errors:
static void Main(string[] args)
{
var task = Task.Run((Func<Task>)Program.Run);
task.Wait();
}
static async Task Run()
{
CIPostBuildTask postBuild = new CIPostBuildTask();
await postBuild.Run();
}
The following line (which I added to my first post in a try-catch), shows the error that follows:
var full = await dbx.Users.GetCurrentAccountAsync();
ERROR: Error in call to API function "users/get_current_account": The given OAuth 2 access token is malformed.
In addition, the following line throws the following error in it's try-catch statement:
var updated = await dbx.Files.UploadAsync(
folder + "/" + file,
WriteMode.Overwrite.Instance,
body: mem);
ERROR: Error in call to API function "files/upload": The given OAuth 2 access token is malformed.
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!