我的共享文件的請求是這樣的:請求/股,則返回401未經授權
request = (HttpWebRequest)WebRequest.Create(requestUri);
request.Method = WebRequestMethods.Http.Post;
response = request.GetResponse();
其中requestUri看起來是這樣的:
https://api.dropbox.com/1/shares/auto/New%20Text%20Document.txt? oauth_consumer_key=MY_KEY&oauth_nonce=913151&oauth_signature_method=HMAC- SHA1&oauth_timestamp=1428055275&oauth_token=TOKEN&oauth_version=1.0&oauth_signatur e=BLABLABLA
request.GetResponse()拋出引發WebException ,它說:
The remote server returned an error: (401) Unauthorized. And for the detailed information I receive this: Additional information: The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel.
流程是這樣的:我用相同的授權參數上傳文件ers 成功然後我嘗試使用上面顯示的調用檢索新上傳的文件的縮短的URL,但收到異常。
請注意,這在一段時間以前工作。可能他們已經改變了API中的某些內容,但我無法找到正確的方法。那麼,我在這裏做錯了什麼?
請檢查您的應用程序密鑰(使用者密鑰)。看起來它沒有正確提供。 – 2015-04-03 12:55:26
這是一個示例鍵,而不是真正的鍵。請檢查以下注釋 – codeRecap 2015-04-03 12:56:56