What is the redirectURL I should add to my Uber app?

I am reading the Uber sdk / api doc, but I am new and I don’t know what redirectURL is. Is this the spoken Uber address? Because I couldn't find it. Or is it the url of a webpage configured by the application developer deployed its own server / local machine? If so, how do I write it?

Completely confused at this point.

Please help with some details as much as possible.

Many thanks!

+3


source to share


3 answers


Here's where I solved this problem. Actually I was confused that if the redirect url is the url for a website on some server then the architect would be quite complicated and there seems to be no way to figure out which authorization code is for which client of the application.

Now I think I am clear, as I read @Romain's comment here and now I know that the redirect url can be the url to open your ios app (I'm sure this works for Android and others).

For example, if your app url scheme / name is ios: myapp then the redirect url could be like this:

myapp://oauth/callback

      

then as soon as the user authorizes your application, the redirect url will open (in this case, redirect to your application); and in AppDelegate.m one of the delegate callback methods:



-(BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation 

      

grab the redirect url with the authorization code sent from Uber; if you print it you will see something like this:

myapp://oauth/callback?code=YOURCODE

      

This way the code can be well received by the right application.

+2


source


API communication is initiated as follows:

  • The corresponding request is redirected to the Uber API,
  • API allows action
  • The API redirects the user to a custom page on your site with a GET parameter that will contain all the required information sent by the API.


So basically, the redurect URL is the page on your site that does the job after authenticating the user through the Uber API.

More in the official doc

+2


source


The redirect url is actually the url to open your app. The official documentation has a good understanding of this. Read here .

0


source







All Articles