Note that there are some explanatory texts on larger screens.

plurals
  1. POLog into vimeo using xAuth
    primarykey
    data
    text
    <p>I try to login within my app to vimeo to upload videos, the App I created on vimeo is approved.</p> <blockquote> <p>Upload Access</p> <p>Approved for the following accounts: Your account</p> </blockquote> <p>I use AFNetworking and AFOAuth1Client (<a href="https://github.com/AFNetworking/AFOAuth1Client" rel="nofollow">https://github.com/AFNetworking/AFOAuth1Client</a>) but also tried AFXAuthClient (<a href="https://github.com/romaonthego/AFXAuthClient" rel="nofollow">https://github.com/romaonthego/AFXAuthClient</a>).</p> <p>using AFOAuth1Client with the following code:</p> <pre><code>self.vimeoClient = [[AFOAuth1Client alloc] initWithBaseURL:[NSURL URLWithString:vimeoBaseUrl] key:@"ClientIDHere" secret:@"SecretHere"]; [self.vimeoClient postPath:@"/oauth/access_token" parameters:[NSDictionary dictionaryWithObjectsAndKeys:@"client_auth",@"x_auth_mode",@"myEmail",@"x_auth_username",@"myPwd",@"x_auth_password",@"write",@"x_auth_permission", nil] success:^(AFHTTPRequestOperation *operation, id responseObject) { NSLog(@"..."); } failure:^(AFHTTPRequestOperation *operation, NSError *error) { NSLog(@":%@", error.description); }]; </code></pre> <p>I get this error:</p> <blockquote> <p>VimeoTest[49559:c07] :Error Domain=AFNetworkingErrorDomain Code=-1011 "Expected status code in (200-299), got 401" UserInfo=0x75622d0 {NSLocalizedRecoverySuggestion=401 Unauthorized - Invalid signature - The oauth_signature passed was not valid., AFNetworkingOperationFailingURLRequestErrorKey=https://vimeo.com/oauth/access_token>, NSErrorFailingURLKey=<a href="https://vimeo.com/oauth/access_token" rel="nofollow">https://vimeo.com/oauth/access_token</a>, NSLocalizedDescription=Expected status code in (200-299), got 401, AFNetworkingOperationFailingURLResponseErrorKey=}</p> </blockquote> <p>using AFXAuthClient with the following code:</p> <pre><code>//update begin AFXAuthToken *token = [[AFXAuthToken alloc] initWithKey:@"Access token from vimeo" secret:@"Access token secret"]; [self.vimeoXClient setToken:token]; //update end self.vimeoXClient = [[AFXAuthClient alloc] initWithBaseURL:[NSURL URLWithString:vimeoBaseUrl] key:@"ClientIDHere" secret:@"SecretHere"]; [self.vimeoXClient authorizeUsingXAuthWithAccessTokenPath:@"/oauth/access_token" accessMethod:@"POST" username: @"myEmail" password: @"myPwd" success:^(AFXAuthToken *accessToken) { NSLog(@"..."); } failure:^(NSError *error) { NSLog(@"error: %@", error.description); }]; </code></pre> <p>I get this Error:</p> <blockquote> <p>2013-07-16 20:18:27.819 VimeoTest[49680:c07] error: Error Domain=AFNetworkingErrorDomain Code=-1011 "Expected status code in (200-299), got 400" UserInfo=0x7223e80 {NSLocalizedRecoverySuggestion=400 Bad Request - Missing required parameter - A required parameter was missing: oauth_token., AFNetworkingOperationFailingURLRequestErrorKey=https://vimeo.com/oauth/access_token>, NSErrorFailingURLKey=<a href="https://vimeo.com/oauth/access_token" rel="nofollow">https://vimeo.com/oauth/access_token</a>, NSLocalizedDescription=Expected status code in (200-299), got 400, AFNetworkingOperationFailingURLResponseErrorKey=}</p> </blockquote> <p>error after updating code (setting the token):</p> <blockquote> <p>2013-07-16 21:20:14.060 VimeoTest[52437:c07] error: Error Domain=AFNetworkingErrorDomain Code=-1011 "Expected status code in (200-299), got 401" UserInfo=0x8b245a0 {NSLocalizedRecoverySuggestion=401 Unauthorized - Permission Denied - The oauth_token passed was either not valid or has expired., AFNetworkingOperationFailingURLRequestErrorKey=https://vimeo.com/oauth/access_token>, NSErrorFailingURLKey=<a href="https://vimeo.com/oauth/access_token" rel="nofollow">https://vimeo.com/oauth/access_token</a>, NSLocalizedDescription=Expected status code in (200-299), got 401, AFNetworkingOperationFailingURLResponseErrorKey=}</p> </blockquote> <p>anyone has any Idea what I am doing wrong?</p> <p>--- UPDATE ---</p> <p>using Runscope I send the following parameters</p> <pre><code>Accept: */* Accept-Encoding: gzip, deflate, compress Authorization: OAuth oauth_nonce="63129149524659229601374074093", oauth_timestamp="1374074093", oauth_version="1.0", oauth_signature_method="HMAC-SHA1", oauth_consumer_key="MYCONSUMERKEYHERE", oauth_token="MYAPPTOKENHERE", oauth_callback="None", oauth_verifier="None", oauth_signature="lW%2BQYzwCcaDzSgoZUtvpSgLRSF4%3D" Connection: close Content-Length: 0 Host: vimeo-com-bbmyq45awg44.runscope.net User-Agent: runscope/0.1 X-Forwarded-For: 54.236.210.241 X-Forwarded-Protocol: https X-Forwarded-Ssl: on X-Real-Ip: 54.236.210.241 X_auth_mode: client_auth X_auth_password: MYPWDHERE X_auth_permission: write X_auth_username: MYUSERNAMEHERE </code></pre> <p>I still get the same response</p> <pre><code>HEADERS Access-Control-Allow-Credentials: true Access-Control-Allow-Methods: GET, PUT, POST, PATCH, DELETE, OPTIONS, HEAD Access-Control-Allow-Origin: * Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 Connection: close Content-Length: 104 Content-Type: text/plain;charset=UTF-8 Date: Wed, 17 Jul 2013 15:14:53 GMT Expires: Wed, 17 Jul 2013 03:14:53 GMT Runscope-Message-Id: 7bd9d07d-d043-4486-9a19-c3572997d3e4 Server: Apache Vary: Accept-Encoding X-Dns-Prefetch-Control: on X-Powered-By: PHP/5.4.14 BODY view raw 401 Unauthorized - Permission Denied - The oauth_token passed was either not valid or has expired. </code></pre> <p>I am really not sure if I miss some params. Is the oauth_verifier or oauth_callback needed? In my vimeo App setup I got the following:</p> <blockquote> <p>Your Callback URL (edit) vimeoTest://success</p> </blockquote>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload