Webhooks
Webhooks are an important service that enable near realtime updates for every trip ordered through the API to be pushed to a web URL defined in your application’s settings. The Developer App settings page can be found below by modifying the URL below with your applications CLIENT_ID.
https://developer.uber.com/dashboard/app/<CLIENT_ID>/settings
¶ Introduction
Webhooks are a communication standard that makes it easy to get push notifications as an event happens. Unlike APIs where you call an endpoint for data, you provide a callback URL where you will be notified as events happen. For example, when an Uber ride is ordered through the API, Uber can send information through HTTP POST to your callback URL. Your callback URL can then execute code based on the POST.
Webhooks can be sent more than once and the delivery is not guaranteed to be in order. To defend against this behavior, a resource_href is provided in the body of the POST to get the most update-to-date information on each resource.
¶ Configure your Webhook
To enable webhooks, log in to the developer dashboard and go the Settings tab for your app. Under the Ride Requests section, add your webhook URL and Signing Key, then click save. The Developer App settings page can also be found below by modifying the URL below with your applications CLIENT_ID.
https://developer.uber.com/dashboard/app/<CLIENT_ID>/settings
You can enter any URL you would like to have events sent to, but this should be a dedicated https page on your server. You can also enter any Signing Key you would like to verify the sender. Some clients use the app secret for this purpose, but that is not required.
¶ POST Parameters
Webhooks sent from Uber’s servers will follow a standard format so that your application can easily understand what action it may want to take based on the contents of the payload.
¶ Available Webhooks
Endpoint | Description |
---|---|
guests.trips.status_changed | Event indicating that the status of a trip has changed. |
guests.trips.trip_message | Event indicating that the driver for the trip has sent a message. |
guests.trips.receipt_ready | Event indicating that a receipt has been created for the trip. |
orders.trips.uclid-info | Event indicating that a trip has been created with linked UCLID (Uber Click ID). |