我尝试使用新的 API sharpbox 1.2。
我试过这段代码:
if (Request.UrlReferrer.ToString() == string.Empty)
{
DropBoxConfiguration config = DropBoxConfiguration.GetStandardConfiguration();
config.AuthorizationCallBack = new Uri("http://localhost:60003/Default.aspx");
DropBoxRequestToken token = DropBoxStorageProviderTools.GetDropBoxRequestToken(config, "customerkey", "customersecret");
string authUrl = DropBoxStorageProviderTools.GetDropBoxAuthorizationUrl(config, token);
Response.Redirect(authUrl);
}
else
{
ICloudStorageAccessToken token1 = DropBoxStorageProviderTools.LoginWithMobileAPI("username", "password", "customerkey", "customersecret");
}
但是我遇到了这样的异常:
“试图执行未经授权的操作”
我正在使用 Asp.NET & C#
非常感谢!