I have a method that returns a DropboxClient
and I need to await a method to be able to get an AccessToken
required to create this DropboxClient
. The snippet of code where I have the problem is:
OAuth2Response authUriComplete =
await Dropbox.Api.DropboxOAuth2Helper.ProcessCodeFlowAsync(token,
options.ClientId, options.ClientSecret);
var dbx = new DropboxClient(authUriComplete.AccessToken);
return dbx;
So I can't figure out how to get this method working, I need to create a method that returns me the DropboxClient
, I know that I could return the task and then await it outside the method but that isn't what I need.