1
DropNet Api을 사용중인 MVC 웹 사이트가 있습니다. 리디렉션 후 MVC에서 Dropnet
public ActionResult AuthorizeDropBox()
{
try
{
var _client = new DropNetClient("API KEY", "API SECRET");
if (_client == null)
throw new DropboxException();
var userLogin = _client.GetToken();
var url = _client.BuildAuthorizeUrl(userLogin, Url.Action("DropBoxCallBack", "Account", null, Request.Url.Scheme));
return Redirect(url);
}
catch (DropboxException dbe)
{
}
}
public ActionResult DropBoxCallBack()
{
//Not sure here how to access the Dropbox api
//var fileBytes = _client.GetFile("/Getting Started.pdf");
return View();
}
그래서 내 웹 사이트가 자신의 데이터를 연결할 수 있도록하고 I
DropBoxCallBack
이 발생에 대해 사용자에게 요청 드롭 박스 페이지로 사용자를 리디렉션합니다.
그러나 여기에는 _client
이 없습니다. 하지만 심지어 _client
을 Session
에 넣으려고 시도했지만 Dropbox 기능에 액세스하려고 할 때 여전히 오류가 발생합니다.
도움을 주시면 감사하겠습니다.
감사