我正在尝试从 Xamarin.iOS 应用程序中调用 vimeo REST API,但我不断收到 401:The oauth_signature passed was not valid.
这是代码:
public async Task GetAll (string userId)
{
var request = OAuth1.CreateRequest (
"GET",
new Uri ("http://vimeo.com/api/rest/v2"),
new Dictionary<string, string> {
{"user_id", userId},
{"format", "json"},
{"method", "vimeo.video.getAll"}
},
CONSUMERKEY, CONSUMERSECRET, TOKENSECRET);
var response = await request.GetResponseAsync ();
using (var stream = response.GetResponseStream ())
using (var reader = new StreamReader (stream, System.Text.Encoding.UTF8)) {
Console.WriteLine (request.RequestUri);
Console.WriteLine(reader.ReadToEnd ());
}
}
该请求看起来是一周形成的,但无论如何它都失败了。有什么提示吗?