我的目標是獲得C#如何通過DropBoxRest API在C#中獲取Dropbox文件?
我收到以下錯誤由DropBoxRest API文件時,我想類型「System.AggregateException」的令牌
未處理的異常出現在 mscorlib.dll
我做錯了什麼?
這裏是我的代碼
var options = new Options
{
ClientId = "", //App key
ClientSecret = "", //App secret
RedirectUri = "https://www.dropbox.com/1/oauth2/authorize"
};
// Initialize a new Client (without an AccessToken)
var client = new Client(options);
// Get the OAuth Request Url
var authRequestUrl = await client.Core.OAuth2.AuthorizeAsync("");
// TODO: Navigate to authRequestUrl using the browser, and retrieve the Authorization Code from the response
var authCode = ""; Which code have to be here ???
// Exchange the Authorization Code with Access/Refresh tokens
var token = await client.Core.OAuth2.TokenAsync(authCode); in this line occured the following error
//An unhandled exception of type 'System.AggregateException' occurred in mscorlib.dll
// Get account info
var accountInfo = await client.Core.Accounts.AccountInfoAsync();
你在上面的代碼中出現錯誤? – 2015-03-03 13:28:48
在這一點var令牌= await client.Core.OAuth2.TokenAsync(authCode); – Developer89 2015-03-03 13:31:22
你是如何獲得authCode的? – 2015-03-03 13:34:14