I'm trying to call the vimeo REST API from within a Xamarin.iOS application, but I keep getting a 401: The oauth_signature passed was not valid.
Here's the code:
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 ());
}
}
The request looks week-formed, but it fails anyway. Any hint ?