error:Redirect uri invalid for vimeo using oath in ios app

1.6k views Asked by At

In my app I'm integrating OAuth2.0 library for vimeo upload. I'm getting error as invalid redirect uri after user log into his account. My code,

self.oauthClient = [[LROAuth2Client alloc] initWithClientID:@"**** client ID ****" secret:@" * secret * " redirectURL:[NSURL URLWithString:@"testMyApp://oauth"]];

In the plist i have given "testMyApp" as string in url schemes.

is this the right way to specify redirect uri? please help!

5

There are 5 answers

1
sclm On

For the Vimeo API to allow for your redirect, you have to register it for your app with the developer site. When it is registered there you are able to use it when you specify the redirect.

The plist scheme registration only notifies iOS that you can handle the scheme; Vimeo is unaware that it's a valid thing to redirect to for your app without this step.

0
Dashron On

Your redirect url must 100% match the url configured on the developer site.

If your user is redirected to testMyApp://oauth your configured redirect url must be exactly testMyApp://oauth

0
felipeimm On

In my case, I had forgotten to enable implicit authentication and was getting the missing redirect_uri message.

enter image description here

0
Balman Rawat On

The redirect url in the developer site must exactly match with the one in your application authentication request. I faced the same problem because of difference in the redirect url. But I fixed that and its working.

Developer site redirect url:enter image description here

My app's request url:

https://api.vimeo.com/oauth/authorize?redirect_uri=vimeo608e5e6ffab5f7d2b567443f57684fdae8f8cb1c://auth&response_type=code&state=aee5252c-963c-4146-8358-a423326dd03c&scope=private%20public%20create%20edit%20delete%20interact&client_id=608e5e6ffab5f7d2b557443f57684fdae8f8cb1c

the value of the key redirect_url in above request is exact to the developer site. Please feel free to comment..

0
Alfie Hanssen On

The 3 pieces of information that you pass back to the Vimeo API (redirect_uri, code, grant_type) must be form URL encoded body parameters.

If they're being passed as query parameters, for example, the request will fail and return the error you're seeing.