How to get updated end location for a Uber Ride? - uber-api

I am using Uber's webhooks to trigger retrieving ride information using uber API. Although if the ride's destination changes when the ride is in progress, I don't get a hook callback. And once the ride is completed, the start and destination information is not available in ride details.
Is there a way to get this information (rather than keep polling the API every few seconds?)

You should receive the location information in the 'in_progress' webhook. We do not currently fire event if destination changes so the only way to discover is to poll the /requests/current end point. Uber API will not return the final location after the trip has been completed or via the history endpoint (though you can see the pickup location).

Related

Uber API for Real time tracking

I want to know whether I can use uber api to track the ride real-time basis. I have found uber help suggest the following:
"Can I see the path a rider took during a trip?"
This feature is only available for ongoing UberPOOL rides. The request details return a set of waypoints (incl. pickup and dropoff locations) for each UberPOOL ride. This information is not accessible in the history but just during the ride.
So does it mean it is not applicable to other types of ride? Please let me know. It will be great if someone can suggest exact API endpoint for tracking the ride on a real-time basis.
Thanks.
It can be checked for any type of ride that you've requested
The Ride Request endpoint allows retrieving the status of an ongoing or completed trip that was created by your app
You have a few different options
Ride Request - Map API
Ride Request - Current API
Ride Request - Details API

Uber API to detect rides

Is it possible to use the Uber API to detect rides that originated from the Uber app?
I'm trying to get a machine learning system to learn when you are using uber.
No, whether a ride originated from the Uber app or from a separate integration is not a field/endpoint in the current Uber API.
Not sure if this is exactly what you are looking for but something that might be helpful is the /history endpoint. "The User Activity endpoint returns a limited amount of data about a user’s lifetime activity with Uber. The response will include pickup and dropoff times, the city the trips took place in, the distance of past requests, and information about which products were requested."
Documentation: https://developer.uber.com/docs/riders/references/api/v1.2/history-get

Uber Ride API - Driver

We are busy looking at Uber Ride API and would like to find out the following:
Is all_trips scope applicable if OAuth authorized user is an Uber driver?
Will Webhook invoke events everytime when a driver accepts/cancels/completes a trips?
will Webhook be invoked during a real trip while the app is under development or Only work in Sandbox?
No. The all_trips scope only works for riders.
Yes. Every trip status change triggers a webhook. Possible statuses changes are:
processing
no_drivers_available
accepted
arriving
in_progress
driver_canceled
rider_canceled
completed.
(List pulled from here, according to the webhooks documentation here).
Yes. If you grant your app the all_trips scope, the Uber API will send webhooks to the URL you have registered at developer.uber.com/dashboard for every trip you take, i.e. sandbox and real trips alike. Note that there is currently no way to flag an Uber app as "in development" or "in production".

Uber driver scheduling

I have created a Uber app(Rides API) and using server token i can able to get
Price and Time estimates.
How can I schedule a driver using Uber api?
If you want to make a request for a ride, you need to POST to /requests. Like agraebe said, you can find documentation on that endpoint here.
This page also has a tutorial on requesting a ride, and the lifecycle of a request, walking you through step by step how requests work.

Uber API Request: All Vehicles Currently In Use

I'm making a ride request via the Uber API. I successfully make a request and get a response that it's in the Processing state. I then open my Uber app to watch until it goes into the Accepted state, but it never gets there. After about 15 seconds of processing, it pops up with a weird error message that I've never seen before in the Uber app: "All vehicles are currently in use. Please call (206) 622-6500". I called the phone number just to see, and it's the number for Yellow Cab in Seattle.
I try to make a request using the Uber app as normal, and it works fine.
I'm not making my ride request using the API sandbox; I'm actually trying to request a ride for myself using the limited access request scope for my personal account.
There's not any code to associate with this since I'm making a request successfully. Uber API support has requested that I ask a question on StackOverflow instead of reaching out to them directly.