This app consumes the API exposed by Uber (https://uber.com/), a popular ride-hailing service provider, and integrates the same with an Ionic app. In this app, we are going to work on the following:
- Integrating REST APIs
- Integrating with Uber OAuth 2.0
- Interacting with device features
- Working with Google APIs
- And finally, booking a ride
Overview about app
The app we are going to build is named Riderr. Riderr helps users to book a cab between two points. This app uses the APIs provided by Uber to book a ride. In this app, we are not going to integrate all the APIs of Uber. We will be implementing a few endpoints that display the user’s information as well as the user’s ride information, and a few endpoints that help us book a ride, view the current ride and cancel a ride.
We need to login developer accounts in Uber and ask for a Client ID, a Client Secret, and a Server Token that we are going to use while making the requests.
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.
https://developer.uber.com/dashboard/create, register for the new user and ask client information which we need in our apps. Using a combination of Client ID and Client Secret, we request an Access Token. Then, using this access
token, we will be accessing Uber resources on behalf of a user.
We are taking list of API from Uber.
We will be building apps with the Ionic app and use scaffolding from GitHub as