Uber APIs
In this section, we are going to go over the various APIs that we are going to consume in the Riderr app. We will also be generating a Client ID, a Client Secret, and a Server Token that we are going to use while making the requests.
Authentication
There are three authentication mechanisms for accessing the Uber API:
- Server Token
- Single sign-on (SSO)
- OAuth 2.0
For us to make requests on behalf of a user, access the user's personal information, and book rides on the user's behalf, we need an OAuth 2.0 access token. Hence we will be following the OAuth 2.0 mechanism. If you are new to the OAuth 2.0 mechanism, take a look at http://www.bubblecode.net/en/2016/01/22/understanding-oauth2/ or https://www.digitalocean.com/community/tutorials/an-introduction-to-oauth-2.
Registering with Uber
Before we proceed further, we need to have an Uber account to log in and register a new app with Uber. If you don't have an account, you can create one quite easily using the Uber app.
Once you have created...